private function TeamAppAccessHandler::checkAccessByPermissions in Apigee Edge 8
Performs access check based on a user's site-wide permissions.
Parameters
\Drupal\Core\Session\AccountInterface $account: The user for which to check access.
Return value
\Drupal\Core\Access\AccessResultInterface The access result.
2 calls to TeamAppAccessHandler::checkAccessByPermissions()
- TeamAppAccessHandler::checkAccess in modules/
apigee_edge_teams/ src/ Entity/ TeamAppAccessHandler.php - Performs access checks.
- TeamAppAccessHandler::checkCreateAccess in modules/
apigee_edge_teams/ src/ Entity/ TeamAppAccessHandler.php - Performs create access checks.
File
- modules/
apigee_edge_teams/ src/ Entity/ TeamAppAccessHandler.php, line 154
Class
- TeamAppAccessHandler
- Access handler for Team App entities.
Namespace
Drupal\apigee_edge_teams\EntityCode
private function checkAccessByPermissions(AccountInterface $account) : AccessResultInterface {
$permissions = [
TeamAppPermissionProvider::MANAGE_TEAM_APPS_PERMISSION,
];
if ($this->entityType
->getAdminPermission()) {
$permissions[] = $this->entityType
->getAdminPermission();
}
return AccessResult::allowedIfHasPermissions($account, $permissions, 'OR');
}