Though one can assign multiple roles to user, to try to keep the abilities DRY, we would prefer to get the same affect when assigning a single role to a user. For example, if I had the following roles
User - access only to login and own profile
Writer - Can do everything a User can do, and create content
Editor - Can do everything a writer can do, can assign stories, can publish
Manager - Can do everything an editor can do, can agree to jobs, can remove published stories, etc
Supervisor - etc
Instead of making sure that the Supervisor user also was assigned to all of the preceding roles, I would like to define the Supervisor's abilities so that it inherited from all of the preceding abilities.
I am thinking that at the top of an abilities definition, I include a call like:
Though one can assign multiple roles to user, to try to keep the abilities DRY, we would prefer to get the same affect when assigning a single role to a user. For example, if I had the following roles
Instead of making sure that the Supervisor user also was assigned to all of the preceding roles, I would like to define the Supervisor's abilities so that it inherited from all of the preceding abilities.
I am thinking that at the top of an abilities definition, I include a call like:
Then add the following to the Ability class:
If this makes sense to you, i am happy to issue a pull request