Correct acl usage of ldap-useradmin #1150
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The acl system of module ldap-useradmin include many acl roles not editable. They are in defaultacl and saved in acl_security_save, but never created in the acl form to be changed.
This patch deletes all not editable acl rights and uses them from the underlying useradmin module., instead of setting some of them to always allowed, as for instance udelete.
This is luckily possible due to exact the same names of acl roles between the two modules. Extending the acl roles for ldap-useradmin is easily possible, as only acl values for not present ldap-useradmin acl settings are copied from useradmin.
The list of secondary groups is limited to only allowed group from the access rights instead of showing all.
Edit masks for user and group consult access rights for options instead of display options always, for instance "change user in other modules".
They also consult module config to not display options not possible to execute, for instance create samba group when not group class is specified.
Access rights are also checked during save of user to reject group membership for not allowed groups. This is to prevent backdoor with direct HTTP request.