Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
iglocska committed Jun 18, 2024
2 parents 52a1635 + f3f369b commit ad04362
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/Model/Table/PermissionLimitationsTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ public function getListOfLimitations(\App\Model\Entity\User $data)
'keyField' => 'id',
'valueField' => 'id',
'conditions' => [
'organisation_id' => $data['organisation_id']
'organisation_id' => $data['organisation_id'],
'disabled' => false
]
])->all()->toList();
}
Expand All @@ -58,11 +59,19 @@ public function getListOfLimitations(\App\Model\Entity\User $data)
}
}
foreach ($limitations as $field => $data) {
$disabledUserIds = $Users->find('list', [
'keyField' => 'id',
'valueField' => 'id',
'conditions' => [
'disabled' => true
]
])->all()->toList();
if (isset($data['global'])) {
$limitations[$field]['global']['current'] = $MetaFields->find('all', [
'conditions' => [
'scope' => 'user',
'field' => $field
'field' => $field,
'parent_id NOT IN' => $disabledUserIds
]
])->count();
}
Expand Down

0 comments on commit ad04362

Please sign in to comment.