reactioncommerce/reaction

Surchages query missing permission validation

Open

#6634 aperta il 7 nov 2022

Vedi su GitHub
 (9 commenti) (0 reazioni) (1 assegnatario)JavaScript (2198 fork)batch import
buggood first issueneeds triage

Metriche repository

Star
 (12.181 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Prerequisites

  • Are you running the latest version?
  • Are you able to consistently reproduce the issue?
  • Did you search the issue queue for existing issue? Search issues

Issue Description

The surcharges query in api-plugin-surcharges is missing the read permission validation. https://github.com/reactioncommerce/reaction/blob/b11e47f05a3d3042b76385e992960dfafb36a286/packages/api-plugin-surcharges/src/queries/surcharges.js#L15

This means every user can query the surcharges regardless the permission they have.

Possible Solution

An example of a query that has the desired permission validation. https://github.com/reactioncommerce/reaction/blob/b11e47f05a3d3042b76385e992960dfafb36a286/packages/api-plugin-accounts/src/queries/groups.js#L14

Guida contributor