I set up nextcloud 13 with LDAP user and group backend enabled, successfully.
Next, I want to restrict users to login nextcloud who belongs to some specific group, e.g. “staff”.
Why not just adapt your LDAP query if you only want a specific group to access NC? There is a lot ways to do this in Nextcloud itself, have a look at where configure LDAP, you will see things such as user and group filters.
Sorry for confusing, I’m using the LDAP in our organization.
This LDAP manages group members by “memberUid”, not “memberOf”.
In this situation and for OC9, it seems that hook can restrict users to login who belongs to specific groups.
But it seems that hook does not work on NC13.