mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] Make sure the group permission update contains unique elements
This commit is contained in:
parent
addc4979ee
commit
96be75e177
1 changed files with 3 additions and 0 deletions
|
@ -452,6 +452,9 @@ def _update_ldap_group_permission(permission, allowed, sync_perm=True):
|
||||||
return existing_permission
|
return existing_permission
|
||||||
|
|
||||||
allowed = [allowed] if not isinstance(allowed, list) else allowed
|
allowed = [allowed] if not isinstance(allowed, list) else allowed
|
||||||
|
|
||||||
|
# Guarantee uniqueness of values in allowed, which would otherwise make ldap.update angry.
|
||||||
|
allowed = set(allowed)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
ldap.update('cn=%s,ou=permission' % permission,
|
ldap.update('cn=%s,ou=permission' % permission,
|
||||||
|
|
Loading…
Add table
Reference in a new issue