How to get User permissions and pass them to login(user) #4345
Unanswered
benjibenoit
asked this question in
Help
Replies: 1 comment 6 replies
-
Hey!
|
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey !
I'm having a little problem configuring permissions.
I have a user table and a permissions table (linked by relationship)
When someone logs in, I want the user to be made up of their data and their permissions. To do this, I've tried :
When I use this and I console.log the permissions just after it works. But if I do a
login(user)
and try to retrieve these permissions in a Policy for example,user.permission
is empty.How can I retrieve the permissions from the login and pass them to the app (here policy for example).
I also have a question: is it good practice to retrieve the permissions only at login and have the app manage them from there, or is it better to re-fetch the permissions at "every" request in case they have changed?
Beta Was this translation helpful? Give feedback.
All reactions