Skip to content

Commit

Permalink
fix: admins have super access
Browse files Browse the repository at this point in the history
  • Loading branch information
potts99 committed Nov 13, 2024
1 parent 5f5b19d commit c835045
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/api/src/lib/roles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ export function hasPermission(
requireAll: boolean = true
): boolean {
// Admins have all permissions
// if (user?.isAdmin) {
// return true;
// }
if (user?.isAdmin) {
return true;
}

// Convert single permission to array for consistent handling
const permissions = Array.isArray(requiredPermissions)
Expand Down

0 comments on commit c835045

Please sign in to comment.