Skip to content

Commit

Permalink
Added missing aircrash viewer role to one of the tables
Browse files Browse the repository at this point in the history
  • Loading branch information
maxrparker committed Dec 15, 2023
1 parent e2e1eaa commit 31ceb44
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/api/middleware/authorization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const UserRoleOptions = [
UserRoles.PHOTO_EDITOR,
UserRoles.PHOTO_VIEWER,
UserRoles.AIRPLANE_CRASH_EDITOR,
UserRoles.AIRPLANE_CRASH_VIEWER,
UserRoles.BOATS_EDITOR,
UserRoles.PLACE_EDITOR,
UserRoles.BURIALS_EDITOR,
Expand All @@ -39,6 +40,8 @@ export function authorize(roles: string[] = [], allowPending = false) {
return next();
}

//TODO for RYAN add an override for ADMINISTRATOR role, maybe? If it doesn't break anything?

return res
.status(403)
.json({ message: 'Unauthorized - Missing role(s): ' + roles });
Expand Down

0 comments on commit 31ceb44

Please sign in to comment.