-
-
Notifications
You must be signed in to change notification settings - Fork 730
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
Update CanCan permissions on adjustments #7452
Update CanCan permissions on adjustments #7452
Conversation
The previous permissions assumed that an adjustment's "adjustable" could only be only line items or orders, and that's no longer true. It's now commonly a shipment or a payment as well.
Codecov Report
@@ Coverage Diff @@
## master #7452 +/- ##
==========================================
+ Coverage 93.08% 93.15% +0.06%
==========================================
Files 631 630 -1
Lines 18097 18088 -9
==========================================
+ Hits 16846 16849 +3
+ Misses 1251 1239 -12
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice simplification to boot 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✨
Awesome @Matt-Yorkley , This works now (sorry for the hectic cursor :-D): Good to go! PS: While investigating the issue I was working on a feature spec (I wanted to make it fail) to delete adjustments from shipping and transaction fees. Between these types of fees the only difference I spotted in the DB was |
Hmm... I'm not sure extra feature specs for each case would have much value here. The change means we don't check the |
Ah cool, that makes sense. Thanks for feedback 👍 |
What? Why?
Closes #7341
The previous permissions assumed that an adjustment's "adjustable" could only be only line items or orders, and that's no longer true. It's now commonly a shipment or a payment as well.
What should we test?
Shipping and Payment fee adjustments can be deleted by non-superadmin enterprise users.
Release notes
Fixed a permissions issue when deleting shipping or payment fee adjustments
Changelog Category: Technical changes