Fixed promotion/demotion permission check

This commit is contained in:
2022-03-02 15:34:39 +00:00
parent d5526083dd
commit 9a0fc3f3bd

View File

@@ -434,7 +434,8 @@ class OrganisationMembersController extends SimpleController
// Access-controlled page // Access-controlled page
if (!$authorizer->checkAccess($currentUser, 'promote_organistion_member', [ if (!$authorizer->checkAccess($currentUser, 'promote_organistion_member', [
'organisation' => $organisation 'organisation' => $organisation,
'user' => $user,
])) { ])) {
throw new ForbiddenException(); throw new ForbiddenException();
} }
@@ -530,7 +531,8 @@ class OrganisationMembersController extends SimpleController
// Access-controlled page // Access-controlled page
if (!$authorizer->checkAccess($currentUser, 'promote_organistion_member', [ if (!$authorizer->checkAccess($currentUser, 'promote_organistion_member', [
'organisation' => $organisation 'organisation' => $organisation,
'user' => $user,
])) { ])) {
throw new ForbiddenException(); throw new ForbiddenException();
} }
@@ -1193,6 +1195,7 @@ class OrganisationMembersController extends SimpleController
// Access-controlled page // Access-controlled page
if (!$authorizer->checkAccess($currentUser, 'promote_organistion_member', [ if (!$authorizer->checkAccess($currentUser, 'promote_organistion_member', [
'organisation' => $organisation, 'organisation' => $organisation,
'user' => $user,
])) { ])) {
throw new ForbiddenException(); throw new ForbiddenException();
} }
@@ -1241,6 +1244,7 @@ class OrganisationMembersController extends SimpleController
// Access-controlled page // Access-controlled page
if (!$authorizer->checkAccess($currentUser, 'promote_organistion_member', [ if (!$authorizer->checkAccess($currentUser, 'promote_organistion_member', [
'organisation' => $organisation, 'organisation' => $organisation,
'user' => $user,
])) { ])) {
throw new ForbiddenException(); throw new ForbiddenException();
} }