Commit 196bbe1e authored by Côme Chilliet's avatar Côme Chilliet

🚑 fix(core) Fix ACL check on wrong category for groupsMembership

issue #5983
parent 4eaacbb9
......@@ -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