Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong permissions applied to upload plugin #8206

Closed
soupette opened this issue Oct 6, 2020 · 0 comments · Fixed by #8320
Closed

Wrong permissions applied to upload plugin #8206

soupette opened this issue Oct 6, 2020 · 0 comments · Fixed by #8320
Labels
severity: low If the issue only affects a very niche base of users and an easily implemented workaround can solve source: core:upload Source is core/upload package

Comments

@soupette
Copy link
Contributor

soupette commented Oct 6, 2020

Describe the bug

The permissions applied to the upload plugin settings is incorect. In order to update the ML’s settings the user should only need the plugins::upload.settings.read permission and currently it’s bind to plugins::upload.assets.read.

Steps to reproduce the behaviour

  1. Create a dummy role with a just the permissions to access the settings page:

{ action: 'plugins::upload.settings.read', subject: null }

  1. Create a dummy user that has the dummy role
  2. Try to update the settings of the ML
  3. See the forbidden error
  4. Add the { action: 'plugins::upload.read', subject: null } permission to its role
  5. Now you can update the settings

Expected behavior
The permissions should be this one : { action: 'plugins::upload.settings.read', subject: null }

System

  • Node.js version: 12
  • NPM version: 6
  • Strapi version: latest

Additional context:

There is no work to do on the admin 😉

@soupette soupette added severity: low If the issue only affects a very niche base of users and an easily implemented workaround can solve source: core:upload Source is core/upload package labels Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity: low If the issue only affects a very niche base of users and an easily implemented workaround can solve source: core:upload Source is core/upload package
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant