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

Disable adjust stock field when user does not have the correct permission #3163

Merged
merged 1 commit into from
May 9, 2019

Conversation

seand7565
Copy link
Contributor

@seand7565 seand7565 commented Apr 5, 2019

Description
Currently, if you only have display permission for StockItems, you can still see and interact with the stock edit field on the Stock Item page. When you attempt to submit, the API returns 401 unauthorized - however this might be confusing to admin users who don't know about their permission level.

This PR disables the stock edit field (and "Back Orderable" tick boxes) if you do not have the correct permissions to edit stock items, with an explanation tooltip as to why you can't edit the stock items.

This should solve issue #2241

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)

@seand7565
Copy link
Contributor Author

Seems like two unrelated payment specs failed. I'm guessing as part of #3160 ?

@kennyadsl
Copy link
Member

@seand7565 Hey there! Can you please rebase against master so we'll see the CI green, thanks!

Copy link
Contributor

@ericsaupe ericsaupe left a comment

Choose a reason for hiding this comment

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

Just ran into this with some of our users! Thanks

Copy link
Contributor

@jacobherrington jacobherrington left a comment

Choose a reason for hiding this comment

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

Thanks @seand7565! 👍

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.

4 participants