- 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
6 months 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.
- πΊπΈUnited States mglaman WI, USA
I don't think this is really postponed on needing more info if the concern is BC.
Fixing the description is a workaround. But π Improve 'administer content' permission description Needs work is much more verbose. I guess we could link and close this as a dupe. But fixing the description does not fix this issue.