Skip to content

Commit 38acaec

Browse files
Mile23paul-m
authored andcommitted
Issue #2951260 by Mile23, Musa.thomas: Argument 1 passed to Drupal\Core\Access\AccessResult::orIf()
1 parent 8711680 commit 38acaec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

config_entity_example/src/RobotAccessController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Drupal\config_entity_example;
44

5+
use Drupal\Core\Access\AccessResult;
56
use Drupal\Core\Entity\EntityAccessControlHandler;
67
use Drupal\Core\Entity\EntityInterface;
78
use Drupal\Core\Session\AccountInterface;
@@ -24,7 +25,7 @@ public function checkAccess(EntityInterface $entity, $operation, AccountInterfac
2425
// The $opereration parameter tells you what sort of operation access is
2526
// being checked for.
2627
if ($operation == 'view') {
27-
return TRUE;
28+
return AccessResult::allowed();
2829
}
2930
// Other than the view operation, we're going to be insanely lax about
3031
// access. Don't try this at home!

0 commit comments

Comments
 (0)