Skip to content

Commit

Permalink
fix(auth): 🐛 Global Permission counting towards BT Permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
Nudelsuppe42 committed Dec 23, 2023
1 parent f98cf95 commit 888f734
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/hooks/useUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ export const useUser = () => {
if (
permissions
.filter((p: any) =>
buildteam ? p.buildTeamId === buildteam || p.buildTeamSlug === buildteam : true,
buildteam
? p.buildTeamId === buildteam ||
p.buildTeamSlug === buildteam ||
p.buildTeamId == null
: true,
)
.find((p: any) => ps.includes(p.permission))
)
Expand Down

0 comments on commit 888f734

Please sign in to comment.