Skip to content

Commit

Permalink
fix: flip flag
Browse files Browse the repository at this point in the history
  • Loading branch information
arily committed Feb 29, 2024
1 parent fce8307 commit 5d067af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/trpc/routers/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const router = _router({
})

const isSelf = user.id === ctx.user?.id
if (!user.roles.includes(UserRole.Normal) && !isSelf && ctx.user?.roles.includes(UserRole.Staff)) {
if (!user.roles.includes(UserRole.Normal) && !isSelf && !ctx.user?.roles.includes(UserRole.Staff)) {
throw new TRPCError({ code: 'NOT_FOUND', message: userNotFound })
}
delete (user as any).secrets // make sure nothing will be sent to client
Expand Down

0 comments on commit 5d067af

Please sign in to comment.