Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
🐛 Add [*] scope to admins
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary authored Dec 10, 2020
1 parent f823255 commit da8bd32
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/modules/auth/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,7 @@ export class AuthService {
}

async getScopes(user: User): Promise<string[]> {
if (user.role === "SUDO") return ["*"];
const scopes: string[] = [`user-${user.id}:*`];
const memberships = await this.prisma.membership.findMany({
where: { user: { id: user.id } },
Expand Down

0 comments on commit da8bd32

Please sign in to comment.