Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add SMTP email sending, LDAP authentication with auto user creation #1119

Closed
wants to merge 4 commits into from

Conversation

epsilon-0
Copy link

@epsilon-0 epsilon-0 commented Jul 4, 2022

Signed-off-by: Aisha Tammy [email protected]

Closes #1014
Closes #937
Closes #865
Closes #1114

@epsilon-0
Copy link
Author

Initial setup for working towards issue #1097.

This PR adds javascript functions to dynamically hide elements based on selected values in a dropdown menu or if a checkbox is marked.

This has no effect as of now but I will make a PR to add the new elements for LDAP authentication which will be hidden by default, unless 'LDAP' is selected in the dav_auth_type options.

additional options are only visible when they are selected

Signed-off-by: Aisha Tammy <[email protected]>
@epsilon-0
Copy link
Author

OK, I've added a whole lot of functionality. The code is a bit rough but that can be worked on given everyone is happy with the features provided.

  • Added SMTP email scheduling: this one is something a lot of people have asked for on many many channels, so this feels like something that will be very useful.
  • Added LDAP authentication with auto-creation of users: I have been unable to find a way to do this in the sabre-io/dav repository plus my PR for LDAP there has been pending for a while, so I think adding it here is a better idea.
  • Hiding of options that are not relevant: LDAP options are only going to be visible when it is selected as the auth type, SMTP options are only going to be visible when it is checked in the box.

Would really like to get these features in the main repo, I think they are very useful for a lot of people.

@epsilon-0 epsilon-0 changed the title add dynamic element hiding functionality add SMTP email sending, LDAP authentication with auto user creation Jul 4, 2022
@epsilon-0
Copy link
Author

Will close issues - #1014, #937, #865, #1114

@epsilon-0
Copy link
Author

This will be easier if the LDAP PR in sabre-io/dav gets merged first, that way the functionality is present in the library and more people can use that.

@ByteHamster
Copy link
Member

Thanks for working on this!

Baikal already has dynamic element hiding functionality (see for example the database settings page). Could you please use the existing functionality instead of creating a new one?

@El-Virus
Copy link
Contributor

El-Virus commented Jul 19, 2022

@epsilon-0 @ByteHamster, I've created a commit in epsilon-0's repository that replaces the dynamic element hiding functionality for the original one.
It also adds support for LDAP filters, groups and attribute searching.

@epsilon-0
Copy link
Author

:O @El-Virus that morphology seems quite complex, kudos for getting that working, I'll try this out for a while on my server and see how it works.

@El-Virus
Copy link
Contributor

@epsilon-0, Great it's good to check on multiple instances. If you find anything, feel free let me know.

Copy link
Member

@ByteHamster ByteHamster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just ran the CI and it found a few problems. Would be great if you could fix them :)

This PR is basically 3 PRs in one (morphology, LDAP, SMTP), so reviewing might take a bit longer than 3 individual PRs would take. The best method to get this merged more quickly would probably be to split it up into 3 individual PRs.

@@ -24,4 +24,4 @@ function copyToClipboard(el) {
sel.removeAllRanges();
$(el).css({backgroundColor:"#75c753"});
$(el).animate({backgroundColor:"transparent"}, 1500);
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert the changes to the two files that are now no longer relevant for your PR

@El-Virus
Copy link
Contributor

@ByteHamster,
About the CI checks, and the File reversion, I'll submit a pr to @epsilon-0's repository in a couple of hours.
And about the whole 3 commits in one, Morphology has to be implemented in both, so it's basically 2 PRs and being honest, they're quite small, so I personally don't think it's worth the trouble of reverting, and restaging all the changes to make them separate PRs.

@ByteHamster
Copy link
Member

And about the whole 3 commits in one, Morphology has to be implemented in both, so it's basically 2 PRs and being honest, they're quite small, so I personally don't think it's worth the trouble of reverting

This is mainly about reviewing. The morphology change itself can directly be merged with about 5 minutes of review. Both other functions need significantly more review. I had to review many of this kind of PRs in the past and splitting the PR up will definitley help getting this merged more quickly. Over the last month, I have looked at this PR multiple times and then closed it again because my spare time would have been too short for testing both LDAP and SMTP. If it was only one of them, the probability of me actually reviewing would have been a lot higher :)

See also https://www.swarmia.com/blog/why-small-pull-requests-are-better/

@El-Virus
Copy link
Contributor

El-Virus commented Jul 24, 2022

@ByteHamster, I'll see what I'm able to do to split the PRs, but about the Morphology commit, its purpose is to hide the SMTP/LDAP fields so it needs to be implemented in both.

@ByteHamster
Copy link
Member

The change to Listbox.php is independent of the other changes. It can be merged right away if it is its own PR. Then the others can build on that.

@El-Virus
Copy link
Contributor

Ok, I'll start making smaller PRs in a few minutes.

@El-Virus
Copy link
Contributor

El-Virus commented Jul 24, 2022

@ByteHamster, @epsilon-0, I've opened #1122, #1123, #1124.
Also, note that #1123 and #1124 branch off of #1122, so keep that in mind.

@epsilon-0 epsilon-0 closed this Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants