-
Notifications
You must be signed in to change notification settings - Fork 65
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
optional imap groups via domain & make domain striping optional #65
Conversation
thank you for the PR! |
Updated to getGroupManager()->createGroup from OC_DB Maybe you can add if backend is IMAP? something like:
|
cool, thanks! hmm, we should probably also make this optional, because probably not everyone wants this behaviour and it would be an unexpected change... so having an optional parameter in the configuration that has to be set to true... |
looking a little closer at this I noticed that this won't work if if the domain is striped away from the username :/ currently this is only the case if the domain is restricted, however I would like to make it possible to configure all this independently... |
okay so I've moved this so it's only executed for IMAP... not sure though if it's the best way to do this... (feedback welcome) |
found this... 🙈 |
please review @nextcloud/user_external |
@violoncelloCH thanks, looks great |
thanks for the feedback @lavdnone! could you test this? |
@violoncelloCH tested, put in prod, safe to merge |
imap groups via domain-part Signed-off-by: none <vlad@teksperts.nyc>
Signed-off-by: none <vlad@teksperts.nyc>
Signed-off-by: Jonas Sulzer <jonas@violoncello.ch> Signed-off-by: none <vlad@teksperts.nyc>
…nal parameters wheter to stripe domain and create group based on domain or not Signed-off-by: Jonas Sulzer <jonas@violoncello.ch> Signed-off-by: none <vlad@teksperts.nyc>
Signed-off-by: Jonas Sulzer <jonas@violoncello.ch> Signed-off-by: none <vlad@teksperts.nyc>
…and domain based group creation Signed-off-by: Jonas Sulzer <jonas@violoncello.ch> Signed-off-by: none <vlad@teksperts.nyc>
…r later extendability e.g. nextcloud#69) Signed-off-by: Jonas Sulzer <jonas@violoncello.ch> Signed-off-by: none <vlad@teksperts.nyc>
lib/imap.php
Outdated
@@ -37,7 +37,7 @@ class OC_User_IMAP extends \OCA\user_external\Base { | |||
* @param boolean $stripeDomain (whether to stripe the domain part from the username or not) | |||
* @param boolean $groupDomain (whether to add the usere to a group corresponding to the domain of the address) | |||
*/ | |||
public function __construct($mailbox, $port = null, $sslmode = null, $domain = null, $stripeDomain = true, $groupDomain = false) { | |||
public function __construct($mailbox, $port = null, $sslmode = null, $domain = null, $stripeDomain = false, $groupDomain = false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the thing is the current behaviour is to stripe the domain...
that's why I've put this to true by default, so we don't break anything for current setups...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also we only apply it if a restrictig domain is specified...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't set it as default either, but as we do it this way in the existing versions, we shouldn't change it now, because it would break existing setups... so I've reverted your last commit, hope it's clear now why :)
thanks for testing this @lavdnone ! |
I would prefer "stripDomain" over "stripeDomain" ;) |
@kesselb you're right... I'm not a native speaker and didn't check that, just took over how others called it... will probably change this naming with a future PR... |
imap groups via domain-part
for #10 working with v15 from nextcloud/apps@master...bjoern86:patch-1
Changes proposed in this pull request:
fixes #10
fixes #76
fixes #68