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 65ed84a commit 8b61c75Copy full SHA for 8b61c75
src/middleware/jwt.ts
@@ -35,7 +35,7 @@ export function getUser(user: JWT, otomi: OtomiStack): SessionUser {
35
} else if (!sessionUser.roles.includes('teamMember')) sessionUser.roles.push('teamMember')
36
// if in team-(not admin), remove 'team-' prefix
37
const teamId = group.substring(5)
38
- if (group.substring(0, 5) === 'team-' && group !== 'team-admin' && !sessionUser.teams.includes(teamId)) {
+ if (group.substring(0, 5) === 'team-' && !sessionUser.teams.includes(teamId)) {
39
// we might be assigned team-* without that team yet existing in the values, so ignore those
40
const existing = otomi.db.getItemReference('teams', { id: teamId }, false)
41
if (existing) sessionUser.teams.push(teamId)
0 commit comments