#12879 fixed problem with validation acl in delete group

This commit is contained in:
Daniel Cebrian 2024-02-13 15:58:54 +01:00
parent ecb8c9f0c7
commit a432ae4d2d
2 changed files with 4 additions and 4 deletions

View File

@ -560,13 +560,13 @@ if ($is_management_allowed === true && $update_group === true) {
} }
} }
$id_group = (int) get_parameter('id_group');
// Delete group. // Delete group.
if ($is_management_allowed === true if ($is_management_allowed === true
&& $delete_group === true && $delete_group === true
&& ((bool) check_acl($config['id_user'], 0, 'PM') === true) && ((bool) check_acl($config['id_user'], $id_group, 'PM') === true)
) { ) {
$id_group = (int) get_parameter('id_group');
$usedGroup = groups_check_used($id_group); $usedGroup = groups_check_used($id_group);
if (!$usedGroup['return']) { if (!$usedGroup['return']) {

View File

@ -107,7 +107,7 @@ class Tree
$userGroupsACL = users_get_groups(false, $this->access); $userGroupsACL = users_get_groups(false, $this->access);
$this->userGroupsACL = empty($userGroupsACL) ? false : $userGroupsACL; $this->userGroupsACL = empty($userGroupsACL) ? [0] : $userGroupsACL;
$this->userGroups = $this->userGroupsACL; $this->userGroups = $this->userGroupsACL;
$this->userGroupsArray = array_keys($this->userGroups); $this->userGroupsArray = array_keys($this->userGroups);