Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292355

Add support for static permission definitions with *.permissions.yml

$
0
0

Problem/Motivation

Per #2294177-5: Allow Drupal\Core to provide [config] entity types, we want to move some config entity types from a core module into core/lib, but that's impeded for entity types that define an "admin_permission" in their annotation, since hook_permissions() is a hook, and we don't currently support hook implementations in core/lib.

Proposed resolution

Change hook_permissions() to a YAML file, which is more inline with D8 patterns. Then core.permissions.yml could define permissions needed by core/lib classes.

Remaining tasks

Decide if that's still an allowable change for D8. If so, do it. If not, decide if system_permissions() is an acceptable place in which to define those permissions.


Viewing all articles
Browse latest Browse all 292355

Trending Articles