-
Notifications
You must be signed in to change notification settings - Fork 13
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
Detect existing email/user on frontend and backend #168
Conversation
Prevent creating users using an email that already exists on the backend. The frontend now discards the guest creation entry if there is at least one exact match for the search terms, which could refer to the user id or email address (the latter being handled by the autocomplete backend)
To test:
@davitol can you test the LDAP cases above ? For the secondary search terms you might want to ask @tomneedham how to do it |
|
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.
looks reasonable and works for me
Works for me even when disabled federated sharing. Would be good to check the JS console and config report in case some non-default setting were used with sharing that might affect this somehow. |
|
Tested and works |
Let's not merge until we get clarification from @cdamken. I wonder if some option like "restrict sharing to own groups" or something is checked ? |
@cdamken any news ? This important PR is blocked. Important because it fixes an issue that could cause trouble. Blocked because you found a case (need env info) which seem to break guest sharing completely. |
@PVince81 userManager->find() by default searches for displayname, email, and their search terms @cdamken any news or info about the apps enabled, whitelist apps, environment etc so we can move forward with this PR? |
@felixboehm can you help here ? |
Ok, turns out this PR doesn't work with OC 10.0.3 but only with OC 10.0.4... I'll try and make it compatible, it was supposed to be compatible. |
|
looks like I was too optimistic with the code and discarded my former workaround for 10.0.3... optimistic that people would upgrade the core version. Ok, I'll add back the workaround to make it compatible whenever the core changes are not there. |
Ok, the last commit brings compatibility with 10.0.2 and 10.0.3. I have tested the basic case with 10.0.2 and 10.0.3:
Only with 10.0.4 the "Add guest" entry will disappear for existing email addresses. |
@PVince81 code looks fine to me |
|
@davitol ok to merge then ? The core PR is independent and an additional fix. |
Prevent creating users using an email that already exists on the
backend.
The frontend now discards the guest creation entry if there is at least
one exact match for the search terms, which could refer to the user id
or email address (the latter being handled by the autocomplete backend)
Fixes #167
Requires owncloud/core#29223 from core to be able to detect exact user matches. Without this core PR the app will still work, but the "Guest" entry will be visible. Clicking it will however display an error message. I think this is acceptable for people still on 10.0.3.