Fixed promotion/demotion permission check
This commit is contained in:
@@ -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();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user