server icon indicating copy to clipboard operation
server copied to clipboard

Add FirstLoginListener to accept shares upon first ldap user login

Open come-nc opened this issue 4 years ago • 3 comments

Trigger OCP\Group\Events\UserAddedEvent on first ldap user login for all his groups, to avoid having to wait on the background job before shares get accepted.

Signed-off-by: Côme Chilliet [email protected]

come-nc avatar Jan 06 '22 15:01 come-nc

/rebase

come-nc avatar Feb 14 '22 10:02 come-nc

This does not work, the listener never gets called on neither of the 2 events according to the log… I do not understand the problem.

Also, I’m wondering if this solution is enough, because it will only work for new users, not when adding an existing user to a group. But checking if Nextcloud is aware of group membership on any login, or each time the group membership is queried is way too expensive performance wise I suspect.

come-nc avatar Feb 14 '22 11:02 come-nc

[notes for myself]

The idea is now to change the format of data stored by the update group background job so that we can easily search in it if a user/group association was already detected, and at login we browse known groups of the user, and if association is missing we announce it with a UserAddedEvent.

come-nc avatar Oct 03 '22 11:10 come-nc

Replaced by https://github.com/nextcloud/server/pull/40367

come-nc avatar Nov 07 '23 09:11 come-nc