We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm just wondering if there is a convenient location to add the user object into the request.
For example, the in isAdmin policy (see https://github.com/tarlepp/angular-sailsjs-boilerplate/blob/master/backend/api/policies/isAdmin.js#L16) you are finding the user. I will likely want a number of policies to access the user object, so is there a good place to set req.user?
isAdmin
req.user
Thanks in advance.
The text was updated successfully, but these errors were encountered:
At this point "boilerplate" don't have really usage for this, but basically you have current user ID in request.token which is set on the authenticated policy (https://github.com/tarlepp/angular-sailsjs-boilerplate/blob/master/backend/api/policies/authenticated.js#L31) after user has been authenticated.
request.token
So basically that's the point that you're looking for. I hope this helps.
Sorry, something went wrong.
So did this help on your problem?
I'm still waiting for the answer for "So did this help on your problem?"
No branches or pull requests
I'm just wondering if there is a convenient location to add the user object into the request.
For example, the in
isAdmin
policy (see https://github.com/tarlepp/angular-sailsjs-boilerplate/blob/master/backend/api/policies/isAdmin.js#L16) you are finding the user. I will likely want a number of policies to access the user object, so is there a good place to setreq.user
?Thanks in advance.
The text was updated successfully, but these errors were encountered: