fix: [permissionLimitiation:getListOfLimitations] Correctly show the correct amount of limitation

- Correctly get the number of org permission if the user is an org_group_manager
- and one of the org he/she manages doesn't have a user
develop
Sami Mokaddem 2024-09-24 16:00:26 +02:00
parent 9ca5af34a3
commit 888661a172
1 changed files with 2 additions and 2 deletions

View File

@ -83,8 +83,8 @@ class PermissionLimitationsTable extends AppTable
'scope' => 'user',
'field' => $field,
];
if (!empty($ownOrgUserIds)) {
$conditions['parent_id IN'] = array_values($ownOrgUserIds);
if ($includeOrganisationPermissions) {
$conditions['parent_id IN'] = !empty($ownOrgUserIds) ? array_values($ownOrgUserIds) : [-1];
}
$limitations[$field]['organisation']['current'] = '?';
if ($includeOrganisationPermissions) {