52 calls to AccessResult::forbidden()
- AccessAwareRouterTest::testCheckAccessResultWithReason in core/
tests/ Drupal/ Tests/ Core/ Routing/ AccessAwareRouterTest.php - Tests the matchRequest() function for access denied with reason message.
- AccessAwareRouterTest::testMatchRequestDenied in core/
tests/ Drupal/ Tests/ Core/ Routing/ AccessAwareRouterTest.php - Tests the matchRequest() function for access denied.
- AccessManagerTest::providerTestCheckConjunctions in core/
tests/ Drupal/ Tests/ Core/ Access/ AccessManagerTest.php - Provides data for the conjunction test.
- AccessManagerTest::testCheck in core/
tests/ Drupal/ Tests/ Core/ Access/ AccessManagerTest.php - Tests \Drupal\Core\Access\AccessManager::check().
- AccessManagerTest::testCheckNamedRouteWithDefaultValue in core/
tests/ Drupal/ Tests/ Core/ Access/ AccessManagerTest.php - Tests the checkNamedRoute with default values.
- AccessManagerTest::testCheckNamedRouteWithUpcastedValues in core/
tests/ Drupal/ Tests/ Core/ Access/ AccessManagerTest.php - Tests the checkNamedRoute with upcasted values.
- AccessResult::andIf in core/
lib/ Drupal/ Core/ Access/ AccessResult.php - Combine this access result with another using AND.
- AccessResult::forbiddenIf in core/
lib/ Drupal/ Core/ Access/ AccessResult.php - Creates a forbidden or neutral access result.
- AccessResult::orIf in core/
lib/ Drupal/ Core/ Access/ AccessResult.php - Combine this access result with another using OR.
- AccessResultTest::andOrCacheabilityPropagationProvider in core/
tests/ Drupal/ Tests/ Core/ Access/ AccessResultTest.php - Provides a list of access result pairs and operations to test.
- AccessResultTest::testAccessForbidden in core/
tests/ Drupal/ Tests/ Core/ Access/ AccessResultTest.php - @covers ::forbidden[[api-linebreak]] @covers ::isAllowed[[api-linebreak]] @covers ::isForbidden[[api-linebreak]] @covers ::isNeutral[[api-linebreak]]
- AccessResultTest::testAccessForbiddenReason in core/
tests/ Drupal/ Tests/ Core/ Access/ AccessResultTest.php - @covers ::forbidden[[api-linebreak]]
- AccessResultTest::testAndIf in core/
tests/ Drupal/ Tests/ Core/ Access/ AccessResultTest.php - @covers ::andIf[[api-linebreak]]
- AccessResultTest::testOrIf in core/
tests/ Drupal/ Tests/ Core/ Access/ AccessResultTest.php - @covers ::orIf[[api-linebreak]]
- BlockAccessControlHandler::checkAccess in core/
modules/ block/ src/ BlockAccessControlHandler.php - Performs access checks.
- BlockContentAccessControlHandler::checkAccess in core/
modules/ block_content/ src/ BlockContentAccessControlHandler.php - Performs access checks.
- BlockContentAccessHandlerTest::testAccess in core/
modules/ block_content/ tests/ src/ Kernel/ BlockContentAccessHandlerTest.php - @covers ::checkAccess[[api-linebreak]]
- BlockContentBlock::blockAccess in core/
modules/ block_content/ src/ Plugin/ Block/ BlockContentBlock.php - Indicates whether the block should be shown.
- BlockRepositoryTest::providerBlocksConfig in core/
modules/ block/ tests/ src/ Unit/ BlockRepositoryTest.php - CKEditor5ImageController::imageUploadEnabledAccess in core/
modules/ ckeditor5/ src/ Controller/ CKEditor5ImageController.php - Access check based on whether image upload is enabled or not.
- CKEditor5MediaController::access in core/
modules/ ckeditor5/ src/ Controller/ CKEditor5MediaController.php - Additional access check for ::isMediaImage().
- CommentAccessControlHandler::checkFieldAccess in core/
modules/ comment/ src/ CommentAccessControlHandler.php - Default field access as determined by this access control handler.
- ContentTranslationDeleteAccess::checkAccess in core/
modules/ content_translation/ src/ Access/ ContentTranslationDeleteAccess.php - Checks access to translation deletion for the specified entity.
- CsrfAccessCheck::access in core/
lib/ Drupal/ Core/ Access/ CsrfAccessCheck.php - Checks access based on a CSRF token for the request.
- DefaultAccessCheck::access in core/
lib/ Drupal/ Core/ Access/ DefaultAccessCheck.php - Checks access to the route based on the _access parameter.
- DefaultAccessCheckTest::testAccess in core/
tests/ Drupal/ Tests/ Core/ Access/ DefaultAccessCheckTest.php - Tests the access method.
- DefaultMenuLinkTreeManipulatorsTest::testCheckAccess in core/
tests/ Drupal/ Tests/ Core/ Menu/ DefaultMenuLinkTreeManipulatorsTest.php - Tests the checkAccess() tree manipulator.
- DefinedTestAccessCheck::access in core/
modules/ system/ tests/ modules/ router_test_directory/ src/ Access/ DefinedTestAccessCheck.php - Checks access.
- ElementTest::providerVisibleChildren in core/
tests/ Drupal/ Tests/ Core/ Render/ ElementTest.php - Data provider for testVisibleChildren.
- EntityDeleteMultipleAccessCheck::access in core/
lib/ Drupal/ Core/ Entity/ EntityDeleteMultipleAccessCheck.php - Checks if the user has delete access for at least one item of the store.
- EntityPermissionsForm::access in core/
modules/ user/ src/ Form/ EntityPermissionsForm.php - Checks that there are permissions to be managed.
- EntityTestAccessControlHandler::checkAccess in core/
modules/ system/ tests/ modules/ entity_test/ src/ EntityTestAccessControlHandler.php - Performs access checks.
- entity_test_entity_access in core/
modules/ system/ tests/ modules/ entity_test/ entity_test.module - Implements hook_entity_access().
- entity_test_entity_create_access in core/
modules/ system/ tests/ modules/ entity_test/ entity_test.module - Implements hook_entity_create_access().
- entity_test_entity_field_access in core/
modules/ system/ tests/ modules/ entity_test/ entity_test.module - Implements hook_entity_field_access().
- FilterFormatAccessControlHandler::checkAccess in core/
modules/ filter/ src/ FilterFormatAccessControlHandler.php - Performs access checks.
- FormBuilderTest::providerTestChildAccessInheritance in core/
tests/ Drupal/ Tests/ Core/ Form/ FormBuilderTest.php - Data provider for testChildAccessInheritance.
- MockQuickEditEntityFieldAccessCheck::accessEditEntityField in core/
modules/ quickedit/ tests/ modules/ src/ MockQuickEditEntityFieldAccessCheck.php - Checks access to edit the requested field of the requested entity.
- NodeAccessControlHandler::checkFieldAccess in core/
modules/ node/ src/ NodeAccessControlHandler.php - Default field access as determined by this access control handler.
- QuickEditEntityFieldAccessCheck::access in core/
modules/ quickedit/ src/ Access/ QuickEditEntityFieldAccessCheck.php - Checks Quick Edit access to the field.
- QuickEditEntityFieldAccessCheckTest::testAccessForbidden in core/
modules/ quickedit/ tests/ src/ Unit/ Access/ QuickEditEntityFieldAccessCheckTest.php - Tests checking access to routes that result in AccessResult::isForbidden().
- RendererTest::providerAccessValues in core/
tests/ Drupal/ Tests/ Core/ Render/ RendererTest.php - Provides a list of both booleans.
- RendererTest::testRenderWithAccessControllerResolved in core/
tests/ Drupal/ Tests/ Core/ Render/ RendererTest.php - @covers ::render[[api-linebreak]] @covers ::doRender[[api-linebreak]]
- RoleAccessControlHandler::checkAccess in core/
modules/ user/ src/ RoleAccessControlHandler.php - Performs access checks.
- TestAccessClass::accessResultForbidden in core/
tests/ Drupal/ Tests/ Core/ Render/ RendererTest.php - UserAccessControlHandler::checkAccess in core/
modules/ user/ src/ UserAccessControlHandler.php - Performs access checks.
- UserAccessControlHandler::checkFieldAccess in core/
modules/ user/ src/ UserAccessControlHandler.php - Default field access as determined by this access control handler.
- UserLoginBlock::blockAccess in core/
modules/ user/ src/ Plugin/ Block/ UserLoginBlock.php - Indicates whether the block should be shown.
- UserPermissionsModuleSpecificForm::access in core/
modules/ user/ src/ Form/ UserPermissionsModuleSpecificForm.php - Checks that at least one module defines permissions.
- ViewsBlockBase::blockAccess in core/
modules/ views/ src/ Plugin/ Block/ ViewsBlockBase.php - Indicates whether the block should be shown.
- WorkflowCustomAccessType::workflowAccess in core/
modules/ workflows/ tests/ modules/ workflow_type_test/ src/ Plugin/ WorkflowType/ WorkflowCustomAccessType.php - Implements hook_ENTITY_TYPE_access().
- WorkspaceAccessTest::testPublishWorkspaceAccess in core/
modules/ workspaces/ tests/ src/ Kernel/ WorkspaceAccessTest.php - Tests workspace publishing access.
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.