Commit d7e352d4 authored by Côme Chilliet's avatar Côme Chilliet

Merge branch...

Merge branch '5983-write-acl-on-user-userroles-groupsmembership-not-working-when-write-restrictions-are-set-on-other-user-user-fields' into '1.4-dev'

Resolve "Write ACL on user / userRoles / groupsMembership not working when write restrictions are set on other user / user fields."

See merge request fusiondirectory/fd!585
parents 4eaacbb9 196bbe1e
......@@ -370,12 +370,12 @@ class ogroup extends simplePlugin
$addingMembers = array_diff($userMembers, $savedMembers);
$removingMembers = array_diff($savedMembers, $userMembers);
foreach ($addingMembers as $dn) {
if (strpos($ui->get_permissions($dn, 'user/user', 'groupsMembership', $this->acl_skip_write()), 'w') === FALSE) {
if (strpos($ui->get_permissions($dn, 'user/userRoles', 'groupsMembership', $this->acl_skip_write()), 'w') === FALSE) {
$errors[] = msgPool::permModify($dn, 'groupsMembership');
}
}
foreach ($removingMembers as $dn) {
if (strpos($ui->get_permissions($dn, 'user/user', 'groupsMembership', $this->acl_skip_write()), 'w') === FALSE) {
if (strpos($ui->get_permissions($dn, 'user/userRoles', 'groupsMembership', $this->acl_skip_write()), 'w') === FALSE) {
$errors[] = msgPool::permModify($dn, 'groupsMembership');
}
}
......
......@@ -124,12 +124,12 @@ class roleGeneric extends simplePlugin
$addingOccupants = array_diff($this->roleOccupant, $savedOccupants);
$removingOccupants = array_diff($savedOccupants, $this->roleOccupant);
foreach ($addingOccupants as $dn) {
if (strpos($ui->get_permissions($dn, 'user/user', 'rolesMembership', $this->acl_skip_write()), 'w') === FALSE) {
if (strpos($ui->get_permissions($dn, 'user/userRoles', 'rolesMembership', $this->acl_skip_write()), 'w') === FALSE) {
$errors[] = msgPool::permModify($dn, 'rolesMembership');
}
}
foreach ($removingOccupants as $dn) {
if (strpos($ui->get_permissions($dn, 'user/user', 'rolesMembership', $this->acl_skip_write()), 'w') === FALSE) {
if (strpos($ui->get_permissions($dn, 'user/userRoles', 'rolesMembership', $this->acl_skip_write()), 'w') === FALSE) {
$errors[] = msgPool::permModify($dn, 'rolesMembership');
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment