Would be great to add or remove roles dynamically.
So basically the idea is to
- add a role from the defined config, if it does not exists (already possible).
- remove a role if it is not defined in the config (AND it is not a default role !!!)
I'd suggest not to remove default rules.
@kellymears What do you think? Should not be too hard to implement :)
Edit: Might be confusing, though. If we had a whitelist of roles, that should not be removed at all, this might be difficult or impossible to maintain when it comes to custom roles, added by plugins. Maybe its a godd idea to introduce another config array, that defines all roles that could be removed dynamically. Like this:
'removable' => [
'mycustomRole',
'myothercustomerrole'
],
or alternatively by defining it in the existing roles array like this:
'mycustomRole' => [
'removable' => true,
],
'myothercustomerrole' => [
'removable' => true,
],
Would be great to add or remove roles dynamically.
So basically the idea is to
I'd suggest not to remove default rules.
@kellymears What do you think? Should not be too hard to implement :)
Edit: Might be confusing, though. If we had a whitelist of roles, that should not be removed at all, this might be difficult or impossible to maintain when it comes to custom roles, added by plugins. Maybe its a godd idea to introduce another config array, that defines all roles that could be removed dynamically. Like this:
or alternatively by defining it in the existing roles array like this: