Skip to content

Commit

Permalink
Lock deleteUserProductReviews
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikearaya authored and pozylon committed Nov 6, 2024
1 parent a5d79a2 commit e378d1c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/api/src/roles/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ const actions: Record<string, string> = [
'confirmMediaUpload',
'viewStatistics',
'deleteUser',
'deleteUserProductReviews',
].reduce((oldValue, actionValue) => {
const newValue = oldValue;
newValue[actionValue] = actionValue;
Expand Down
1 change: 1 addition & 0 deletions packages/api/src/roles/loggedIn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ export const loggedIn = (role: any, actions: Record<string, string>) => {
role.allow(actions.viewUserTokens, isMyself);
role.allow(actions.updateUser, isMyself);
role.allow(actions.deleteUser, isMyself);
role.allow(actions.deleteUserProductReviews, isMyself);
role.allow(actions.sendEmail, isOwnedEmailAddress);
role.allow(actions.viewOrder, isOwnedOrder);
role.allow(actions.updateOrder, isOwnedOrder);
Expand Down

0 comments on commit e378d1c

Please sign in to comment.