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

Admin permission fixes #4276

Conversation

spaghetticode
Copy link
Member

Description

This PR fixes a few permission checks in the admin area that were either missing or wrong.

Checklist:

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have updated Guides and README accordingly to this change (if needed)
  • I have added tests to cover this change (if needed)
  • I have attached screenshots to this PR for visual changes (if needed)

@spaghetticode spaghetticode self-assigned this Feb 22, 2022
This button should be visible only to users that can `create`
adjustment reasons.
This button should be visible only to users that can `create`
store credit reasons.
The previous check `can? :admin` was not particularly useful, as
it didn't prevent anybody who have generic access to the resource
to attempt editing this data.
@spaghetticode spaghetticode force-pushed the spaghetticode/admin-permission-fixes branch from 0db65d4 to 963aaed Compare February 22, 2022 13:28
Copy link
Contributor

@waiting-for-dev waiting-for-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@waiting-for-dev waiting-for-dev merged commit 02c4205 into solidusio:master Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants