aboutsummaryrefslogtreecommitdiffstats
path: root/util/roles.lua
Commit message (Collapse)AuthorAgeFilesLines
* util.roles: Add a :policies() method to iterate through available policiesMatthew Wild2022-10-071-0/+10
| | | | | | We don't expose the policies directly, to force people to go through :may(). However, there are times when we really just need to know what policies a role has inside it (e.g. for reporting or debugging purposes).
* util.roles: Return nil if the role has no explicit policy (fixes inheritance)Matthew Wild2022-10-071-1/+1
| | | | | | | | Previously, if the first inherited role had no opinion, it returned false and prevented further consultation of other inherited roles. This bug was found thanks to the implementation of missing test cases identified through mutation testing.
* util.roles: Add new utility module to consolidate role objects and methodsMatthew Wild2022-07-191-0/+100