fix: [users:index] Removed deletion button for self

Fix #118
develop-unstable
Sami Mokaddem 2023-02-16 14:59:52 +01:00
parent 88abecfe8f
commit b0e06cd0f6
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 3 additions and 0 deletions

View File

@ -145,6 +145,9 @@ echo $this->element('genericElements/IndexTable/index_table', [
]
],
'function' => function ($row, $options) use ($loggedUser, $validRoles) {
if ($row['id'] == $loggedUser['id']) {
return false;
}
if (empty($loggedUser['role']['perm_admin'])) {
if (empty($loggedUser['role']['perm_org_admin'])) {
return false;