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

lineitems can be modified even after an order state is set to completed #7254

Closed
tommiller1 opened this issue Mar 30, 2016 · 6 comments
Closed

Comments

@tommiller1
Copy link
Contributor

Hello,

Like the title says, I am able to add/update/remove lineitems for orders that are in the completed state. Is this intentional? How do I prevent this from happening?

I am updating orders through the spree api btw.

Regards.

@damianlegawiec
Copy link
Member

Hi @tommiller1 , this is intentional to allow store owners modify order contents later.

@tommiller1
Copy link
Contributor Author

Ok but atm even normal users can update orders after they have been completed. I am logging in with the users spree_api_key to update the orders. There should be a privilege check to prohibit the normal users from modifying the orders imo.

@priyank-gupta
Copy link
Contributor

@tommiller1 I see your point here. The ability described for Order doesn't have completed? check while updating order. https://github.com/spree/spree/blob/master/core/app/models/spree/ability.rb#L47.

Can you do a pull request for this ? Thanks!!!

@tommiller1
Copy link
Contributor Author

Hi, I added a pull request but it seems some of the feature specs rely on an order being editable even when its in the completed state, I am not familiar enough with spree to make any decisions regarding this. Is there any way I can just modify the update ability in my own project without modifying spree?

@Ashishb1990
Copy link

There are many issue in spree when you will submit address form it will not go for next , you can add item and quantity both will multiply wrong

@bbonislawski
Copy link
Contributor

It's already fixed afaik.

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

No branches or pull requests

5 participants