Skip to content

Commit

Permalink
Fixed issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Aydan Pirani committed Aug 26, 2024
1 parent e9aa294 commit 0e192c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/services/auth/auth-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ export function createGoogleStrategy(device: string) {
const email = profile._json.email;

// Check if user is admin -> if so, add ADMIN role to their list
const isAdmin = email && Config.AUTH_ADMIN_WHITELIST.has(email);
// const isAdmin = email && Config.AUTH_ADMIN_WHITELIST.has(email);

Database.ROLES.findOneAndUpdate(
{ userId: userId },
{
displayName,
email,
...(isAdmin && { roles: { $addToSet: Role.Enum.ADMIN } }),
// ...(isAdmin && { roles: { $addToSet: Role.Enum.ADMIN } }),
},
{ upsert: true }
)
Expand Down

0 comments on commit 0e192c7

Please sign in to comment.