We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent adcddc9 commit 08047b3Copy full SHA for 08047b3
lib/middleware/user-context.js
@@ -21,10 +21,12 @@ module.exports = function userContextMiddleware() {
21
loopbackContext.set('accessToken', req.accessToken.id);
22
const app = req.app;
23
const UserModel = app.accessUtils.options.userModel || 'User';
24
+ const TeamModel = app.accessUtils.options.groupAccessModel || 'Team';
25
+
26
27
return Promise.join(
28
app.models[UserModel].findById(req.accessToken.userId),
- app.models.Team.find({
29
+ app.models.[TeamModel].find({
30
where: {
31
userId: req.accessToken.userId
32
}
0 commit comments