Skip to content

Commit

Permalink
Merge pull request #20 from itk-dev/feature/LOOP-832-access-check
Browse files Browse the repository at this point in the history
LOOP-832: Fixed entity create access check
  • Loading branch information
rimi-itk authored Apr 14, 2021
2 parents c7902df + 252dfb8 commit 8d2954d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion web/profiles/custom/os2loop/src/Helper/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ public function __construct(ConfigFactoryInterface $configFactory) {
* Implements hook_entity_create_access().
*/
public function entityCreateAccess(AccountInterface $account, array $context, $entity_bundle): AccessResult {
return $this->contentTypeAccess($entity_bundle);
if ('node' === $context['entity_type_id']) {
return $this->contentTypeAccess($entity_bundle);
}

return AccessResult::neutral();
}

/**
Expand Down

0 comments on commit 8d2954d

Please sign in to comment.