Skip to content

Admin screens must return their required rights #62

@Mistralys

Description

@Mistralys

The current implementation of the admin screens' isUserAllowed() method effectively hides the rights required. Instead, screens should have a getRequiredRights() method, and this list of rights be used in isUserAllowed().

Custom right check implementations can still be implemented by overriding isUserAllowed(). So far, no use cases are known though.

Migration

This can be done in two steps, to give applications the time to upgrade their screens:

  1. The new trait AllowableMigrationTrait can be used in screens to implement the new methods beforehand
  2. Add the methods in the AdminScreenInterface interface to force all screens to use the method

Metadata

Metadata

Assignees

Labels

activeWork has been started on this topic.developmentRegular development task

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions