Allow group Owners to manually add members when LDAP lock is enabled
In #4354 (closed) we are proposing an admin-level setting to lock membership changes to LDAP sync. Under that setting, only instance administrators are allowed to manually add members to group outside of LDAP.
We should optionally extend this privilege to allow group Owners to manually add members to their group:
- Some instances may want to add users to groups/projects, but not add them to LDAP. This is common for contractors/customers.
- Manual member management will be burdensome for administrators if they're the only user type who can handle this. Frequently, admins are a very small group of privileged users.
After #4354 (closed) is complete, allow group Owners to manually add to group membership when "allow group Owners to manage LDAP-related settings" is enabled.
- What happens when this is unchecked? Members of groups (and their subgroups/projects) are not manually editable by Owners.
- What happens when this is checked? A configuration option is exposed in group LDAP settings that reads "Lock membership of this group to LDAP". This should default to true.
When this lock is enabled, we should remove all existing users added to projects/subgroups outside of LDAP. We should inform the group owner enabling the lock that this will take place.