function PermissionChecker::hasPermission
Same name in other branches
- 10 core/lib/Drupal/Core/Session/PermissionChecker.php \Drupal\Core\Session\PermissionChecker::hasPermission()
Overrides PermissionCheckerInterface::hasPermission
File
-
core/
lib/ Drupal/ Core/ Session/ PermissionChecker.php, line 16
Class
- PermissionChecker
- Checks permissions for an account.
Namespace
Drupal\Core\SessionCode
public function hasPermission(string $permission, AccountInterface $account) : bool {
$item = $this->processor
->processAccessPolicies($account)
->getItem();
return $item && $item->hasPermission($permission);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.