- Issue created by @John Franklin
- π³πΏNew Zealand quietone
Changes are made on 11.x, the main development branch first. Thanks.
- π§πͺBelgium kristiaanvandeneynde Antwerp, Belgium
Add a couple functions to the AccessPolicyInterface that requires the policy to return a list of the affected permissions
That might give false info as another policy could easily override that.
A description could be nice. So maybe start with an overview of currently active policies that show a name and description and then instruct the more technical people where to look if they want to see the code?
Either way, I'm a fan of an overview. I just don't want to overload access policies with methods for the sake of the overview; getLabel() and getDescription() could be nice, getAffectedPermissions() not so much.
You could use attributes, but those get discovered regardless of whether the policy is actually in use. E.g.: If module A has an access policy that module B swaps out, then there's no point in showing module A's version in the UI. With attributes, you would do just that, whereas with methods you would only load the active policies. (Swapping out or decorating access policies is an edge case and generally not recommended, but it's nice to keep the option open)
Moshe suggested you try putting this in https://www.drupal.org/project/security_review β . You could start by listing the class names in your UI, see how that looks and then circle back here to request two new methods for more descriptive info