Skip to content

Strategy for Defining Permissions/Roles With Resource Granularity #112

Answered by frankie567
marcodlk asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @marcodlk 👋

Right now, it's not possible to define roles/permissions at a resource level. Since it's highly dynamic (new resources are added constantly in your app), it would be quite complicated and slow to manage it a Fief level, because you would have a lot of back and forth between your server and Fief.

I suggest you implement it in your own application, with your own logic. It can be as simple as a relationship table linking a user id, a resource and the associated permissions. Something like this:

Fief User ID Resource ID Read Update Delete
USER_1 RESOURCE_1 TRUE FALSE FALSE
USER_1 RESOURCE_2 TRUE TRUE TRUE
USER_2 RESOURCE_1 TRUE TRUE TRUE

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@marcodlk
Comment options

@frankie567
Comment options

Answer selected by marcodlk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants