Skip to content

Commit 8b61c75

Browse files
ferruhcihandennisvankekemCasLubbers
authored
fix: update jwt for team-admin users (#590)
Co-authored-by: Dennis van Kekem <[email protected]> Co-authored-by: CasLubbers <[email protected]>
1 parent 65ed84a commit 8b61c75

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/middleware/jwt.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export function getUser(user: JWT, otomi: OtomiStack): SessionUser {
3535
} else if (!sessionUser.roles.includes('teamMember')) sessionUser.roles.push('teamMember')
3636
// if in team-(not admin), remove 'team-' prefix
3737
const teamId = group.substring(5)
38-
if (group.substring(0, 5) === 'team-' && group !== 'team-admin' && !sessionUser.teams.includes(teamId)) {
38+
if (group.substring(0, 5) === 'team-' && !sessionUser.teams.includes(teamId)) {
3939
// we might be assigned team-* without that team yet existing in the values, so ignore those
4040
const existing = otomi.db.getItemReference('teams', { id: teamId }, false)
4141
if (existing) sessionUser.teams.push(teamId)

0 commit comments

Comments
 (0)