Updated: Comment #N

Problem/Motivation

#2105557: Add an admin_permission to EntityType annotations to provide simple default access handling added the very useful admin_permission annotation property. This removes the need for an access controller in most cases, and still simplifies the ones that exist.

However, it is not fully used yet, which is confusing for contrib module authors, especially since the access controller is optional. It will happily deny you access, even as uid 1.

Proposed resolution

Ensure that all config entities with list controllers have a permission defined.

Remaining tasks

N/A

User interface changes

N/A

API changes

N/A

CommentFileSizeAuthor
#1 config-admin-perm-2172973-1.patch6.98 KBtim.plunkett
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tim.plunkett’s picture

Status: Active » Needs review
FileSize
6.98 KB
larowlan’s picture

I think whilst this makes us more consistent, not sure it helps with the 'whoops I forgot to add admin_permission' perhaps we should add a watchdog notice before returning null in checkAccess?

otherwise rtbc

tim.plunkett’s picture

Hmm, access() is called a lot. Though I guess it doesn't fall through to the NULL part of checkAccess that often...
Putting a watchdog call in EntityAccessController feels a bit wrong though.

larowlan’s picture

Status: Needs review » Reviewed & tested by the community
larowlan’s picture

meh thats not the issue, there's an issue about having a dev env.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 723e5ea and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.