I want to pass on the names of the assigned permissions of the user to JS.
Generating the list of permissions by userId will include all parents/children.
For example, as per the RBAC example from the documentation
updateArticle
updateArticleOwn === children ===> updateArticle
calling getPermissionsByUserId
will produce a list of
[
'updateArticle',
'updateArticleOwn',
]
However, in this case, I would like the list to only have the updateArticleOwn
permission listed.
[
'updateArticleOwn',
]
Does anyone have some sample code or suggestion on how to produce this type of permissions list?