In our use of node relations, we take advantage of dynamic roles to define a permissions schema where the role is really a Team id and all the subjects are members of that team. It would be useful for us to be able to access the in-memory definition of what roles map to a verb. For example, we may want to ask what team can execute an action, rather than asking who the subjects are.
This PR adds what seems like a pretty simply addition of a getRoles function, which returns a filtered list of all the roles in a context that map to a specified verb.
In our use of node relations, we take advantage of dynamic roles to define a permissions schema where the
role
is really a Team id and all thesubject
s are members of that team. It would be useful for us to be able to access the in-memory definition of whatroles
map to averb
. For example, we may want to ask what team can execute an action, rather than asking who the subjects are.This PR adds what seems like a pretty simply addition of a
getRoles
function, which returns a filtered list of all the roles in a context that map to a specified verb.