Open eddieajau opened 9 years ago
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.
So basically that's the point that you're looking for. I hope this helps.
So did this help on your problem?
I'm still waiting for the answer for "So did this help on your problem?"
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.