Closed lavdnone closed 5 years ago
thank you for the PR! yes this would need some adaptions for the DB part (sorry I currently don't the time for it)... also simply adding this to the base.php could cause other problems if someone uses email addresses as usernames or simply usernames with @ s in an other backend... it would at least be needed to check if the backend is IMAP before applying this...
Updated to getGroupManager()->createGroup from OC_DB
Maybe you can add if backend is IMAP? something like:
if($createduser->getBackendClassName() === 'OC_User_IMAP')
if(get_class($backend) === 'OC_User_IMAP')
cool, thanks! I'll look into this as soon as I'll find some time...
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... so in the end it should also be possible to restrict to multiple domains, stripe the domain (admin would need to make sure there are no username conflicts) but still put users into a group according to the domain...
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) I've also added the possibility for two additional parameters whether to stripe the domain part and whether to create a group from the domain or not... also the generation of the group is not yet working correctly... need to investigate in how this works...
also the generation of the group is not yet working correctly... need to investigate in how this works...
found this... :see_no_evil: should be working now
please review @nextcloud/user_external
@violoncelloCH thanks, looks great
thanks for the feedback @lavdnone! could you test this? I know I could approve this PR myself because I didn't open it, but because I've changed quite a lot here, I would like to have a proper review (and test) from someone else :) (cc @nextcloud/user_external)
@violoncelloCH tested, put in prod, safe to merge
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 https://github.com/nextcloud/apps/compare/master...bjoern86:patch-1
Changes proposed in this pull request:
fixes #10 fixes #76 fixes #68