Simplified management of roles and allowed to made them inheritable.#2241
Simplified management of roles and allowed to made them inheritable.#2241Daniel-KM wants to merge 2 commits intoomeka:developfrom
Conversation
|
So the idea here is that the value for each role in that "roles" key is the roles it inherits from, and the default ones just don't inherit and that's why they're all empty arrays? I feel like I'd prefer to see these three config arrays squashed into one "roles" key with the structure and then we don't have to repeat the ids several places, plus an explicit "parents" subkey feels a little more self-documenting. |
|
I have no preference for the structure of the config, i recopied the old one of \Omeka\Permissions\Acl that has an array for roles and another one for labels. The main point is to be able to manage roles and new roles simpler, for example guest and derivated ones. Currently, it is complex, because the roles should be created early to be fully managed in previous modules. For parents, this is a native feature of Laminas Acl (https://docs.laminas.dev/laminas-permissions-acl/usage/#multiple-inheritance-among-roles) and the list of parents just need to be passed when the role is created. The default roles don't use parents, so they are empty array, but a module can add new rights for them just by adding one or more new roles. |
|
So at your choice. |
No description provided.