I find myself wanting to define a lot of permissions on both create and update (if a user can create a record with a given field, they most likely are also allowed to update that field. This isn't too bad when it's just a few fields, but I have a complex model that requires the following statements:
I just updated the pull request to modify the cannot function in the same manner as can. They both now support an array of actions as the first parameter.
I find myself wanting to define a lot of permissions on both create and update (if a user can create a record with a given field, they most likely are also allowed to update that field. This isn't too bad when it's just a few fields, but I have a complex model that requires the following statements:
Not only is this very verbose, it's a problem for maintenance as the field list changes.
I've modified the
can
statement to optionally take an array of actions allowing the previous examples to be completed in one command.