Skip to content
Snippets Groups Projects
Commit 71384146 authored by Jonathan Sacksick's avatar Jonathan Sacksick
Browse files

Issue #3496790: Logic problem in the Addressbook controller.

parent 7aca1a25
No related branches found
No related tags found
No related merge requests found
Pipeline #384608 canceled
...@@ -295,7 +295,7 @@ class AddressBookController implements ContainerInjectionInterface { ...@@ -295,7 +295,7 @@ class AddressBookController implements ContainerInjectionInterface {
$result = $access_control_handler->createAccess($profile_type->id(), $account, [ $result = $access_control_handler->createAccess($profile_type->id(), $account, [
'profile_owner' => $user, 'profile_owner' => $user,
], TRUE); ], TRUE);
if ($result->isAllowed()) { if (!$result->isAllowed()) {
// There is no create any/own permission, confirm that the account is // There is no create any/own permission, confirm that the account is
// either an administrator, or they're creating a profile for themselves. // either an administrator, or they're creating a profile for themselves.
$admin_permission = $this->entityTypeManager->getDefinition('profile')->getAdminPermission(); $admin_permission = $this->entityTypeManager->getDefinition('profile')->getAdminPermission();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment