diff --git a/src/Controller/OrganisationsController.php b/src/Controller/OrganisationsController.php index 24fdd27..3106593 100644 --- a/src/Controller/OrganisationsController.php +++ b/src/Controller/OrganisationsController.php @@ -101,8 +101,8 @@ class OrganisationsController extends AppController { $currentUser = $this->ACL->getUser(); if ( - !($currentUser['Organisation']['id'] == $id && $currentUser['Role']['perm_org_admin']) && - !$currentUser['Role']['perm_admin'] + !($currentUser['organisation']['id'] == $id && $currentUser['role']['perm_org_admin']) && + !$currentUser['role']['perm_admin'] ) { throw new MethodNotAllowedException(__('You cannot modify that organisation.')); }