Search for hasPermission

  1. Search 7.x for hasPermission
  2. Search 8.9.x for hasPermission
  3. Search 10.3.x for hasPermission
  4. Search 11.x for hasPermission
  5. Other projects
Title Object type File name Summary
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.
AccessResultTest::providerTestAllowedIfHasPermissions function core/tests/Drupal/Tests/Core/Access/AccessResultTest.php Provides data for the testAllowedIfHasPermissions() method.
AccessResultTest::testAllowedIfHasPermissions function core/tests/Drupal/Tests/Core/Access/AccessResultTest.php Tests allowedIfHasPermissions().
AccountInterface::hasPermission function core/lib/Drupal/Core/Session/AccountInterface.php Checks whether a user has a certain permission.
AccountProxy::hasPermission function core/lib/Drupal/Core/Session/AccountProxy.php Checks whether a user has a certain permission.
Role::hasPermission function core/modules/user/src/Entity/Role.php Checks if the role has a permission.
RoleInterface::hasPermission function core/modules/user/src/RoleInterface.php Checks if the role has a permission.
User::hasPermission function core/modules/user/src/Entity/User.php Checks whether a user has a certain permission.
UserSession::hasPermission function core/lib/Drupal/Core/Session/UserSession.php Checks whether a user has a certain permission.
UserSessionTest::providerTestHasPermission function core/tests/Drupal/Tests/Core/Session/UserSessionTest.php Provides test data for getHasPermission().
UserSessionTest::testHasPermission function core/tests/Drupal/Tests/Core/Session/UserSessionTest.php Tests the has permission method.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.