- Issue created by @mglaman
- πΊπΈUnited States mglaman WI, USA
The same is true for \Drupal\node\NodeAccessControlHandler::checkCreateAccess
Parent:
protected function checkCreateAccess(AccountInterface $account, array $context, $entity_bundle = NULL) { if ($admin_permission = $this->entityType->getAdminPermission()) { return AccessResult::allowedIfHasPermission($account, $admin_permission); } else { // No opinion. return AccessResult::neutral(); } }
Node:
protected function checkCreateAccess(AccountInterface $account, array $context, $entity_bundle = NULL) { return AccessResult::allowedIf($account->hasPermission('create ' . $entity_bundle . ' content'))->cachePerPermissions(); }
It should call the parent as well.
- Status changed to Postponed: needs info
about 1 month ago 2:12am 25 March 2025 - π¦πΊAustralia acbramley
I don't think we could do this in a way that would preserve BC.
Instead we can improve the description of the administer nodes permission in π Improve 'administer content' permission description Needs work
I agree it's really not ideal, if we were to add an admin_permission I think it'd need to be a new permission.