Skip to content

Commit

Permalink
Merge pull request #2033 from bcgov/fix/sow-upload-permissions
Browse files Browse the repository at this point in the history
fix: allow analyst role to use sow-upload api route
  • Loading branch information
marcellmueller authored Aug 2, 2023
2 parents 1a022d4 + d67fc17 commit 982e0cb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/backend/lib/sow-upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ const sowUpload = Router();

const processSow: ExpressMiddleware = async (req, res) => {
const authRole = getAuthRole(req);
const isRoleAuthorized = authRole?.pgRole === 'ccbc_admin';
const isRoleAuthorized =
authRole?.pgRole === 'ccbc_admin' || authRole?.pgRole === 'ccbc_analyst';

if (!isRoleAuthorized) {
return res.status(404).end();
Expand Down

0 comments on commit 982e0cb

Please sign in to comment.