Role::hasPermission |
function |
core/modules/user/src/Entity/Role.php |
Checks if the role has a permission. |
UserSession::hasPermission |
function |
core/lib/Drupal/Core/Session/UserSession.php |
|
AccountProxy::hasPermission |
function |
core/lib/Drupal/Core/Session/AccountProxy.php |
|
RoleInterface::hasPermission |
function |
core/modules/user/src/RoleInterface.php |
Checks if the role has a permission. |
AccountInterface::hasPermission |
function |
core/lib/Drupal/Core/Session/AccountInterface.php |
Checks whether a user has a certain permission. |
UserSessionTest::testHasPermission |
function |
core/tests/Drupal/Tests/Core/Session/UserSessionTest.php |
Tests the has permission method. |
AccessResult::allowedIfHasPermission |
function |
core/lib/Drupal/Core/Access/AccessResult.php |
Creates an allowed access result if the permission is present, neutral otherwise. |
AccessResult::allowedIfHasPermissions |
function |
core/lib/Drupal/Core/Access/AccessResult.php |
Creates an allowed access result if the permissions are present, neutral otherwise. |
UserSessionTest::testHasPermissionLegacy |
function |
core/tests/Drupal/Tests/Core/Session/UserSessionTest.php |
Tests deprecation when permission is not a string. |
PermissionCheckerInterface::hasPermission |
function |
core/lib/Drupal/Core/Session/PermissionCheckerInterface.php |
Checks whether an account has a permission. |
AccessResultTest::testAllowedIfHasPermissions |
function |
core/tests/Drupal/Tests/Core/Access/AccessResultTest.php |
Tests allowedIfHasPermissions(). |
CalculatedPermissionsItemTest::testHasPermission |
function |
core/tests/Drupal/Tests/Core/Session/CalculatedPermissionsItemTest.php |
Tests the permission check when the admin flag is not set. |
AccessResultTest::providerTestAllowedIfHasPermissions |
function |
core/tests/Drupal/Tests/Core/Access/AccessResultTest.php |
Provides data for the testAllowedIfHasPermissions() method. |
CalculatedPermissionsItemTest::testHasPermissionWithAdminFlag |
function |
core/tests/Drupal/Tests/Core/Session/CalculatedPermissionsItemTest.php |
Tests the permission check when the admin flag is set. |