Skip to content

Commit

Permalink
fix: Fixed permissions for deleting fundraising campaigns (Palisadoes…
Browse files Browse the repository at this point in the history
…Foundation#2256)

- Adjusted permissions checks to allow superadmins to delete fundraising campaigns as intended.
- Adjusted permissions checks to allow admins of the organization to delete fundraising campaigns as intended.
- Ensured no other functionality got affected.
- Ensured all the tests are passing succesfully.

Signed-off-by: Akhilender <[email protected]>
  • Loading branch information
akhilender-bongirwar authored Apr 22, 2024
1 parent 5f7b155 commit 7bd0b3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/resolvers/Mutation/removeFundraisingCampaign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export const removeFundraisingCampaign: MutationResolvers["removeFundraisingCamp
);

// Checks whether the user is admin of the organization or not.
if (!currentUserIsOrgAdmin || !currentUserAppProfile.isSuperAdmin) {
if (!(currentUserIsOrgAdmin || currentUserAppProfile.isSuperAdmin)) {
throw new errors.UnauthorizedError(
requestContext.translate(USER_NOT_AUTHORIZED_ERROR.MESSAGE),
USER_NOT_AUTHORIZED_ERROR.CODE,
Expand Down

0 comments on commit 7bd0b3f

Please sign in to comment.