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

CanCan exception in Spree::Api::BaseController #4820

Open
Zigreal opened this issue Dec 29, 2022 Discussed in #4819 · 0 comments
Open

CanCan exception in Spree::Api::BaseController #4820

Zigreal opened this issue Dec 29, 2022 Discussed in #4819 · 0 comments

Comments

@Zigreal
Copy link

Zigreal commented Dec 29, 2022

Discussed in #4819

Originally posted by Zigreal December 29, 2022
Hi everybody! Can you please tell me if it makes sense that rescue_from CanCan::AccessDenied, with: :unauthorized returns 401 when the user is denied an action? For example, "authorize! :update, @order, order_token" - if I set a condition in the rights set that I can't update the order, then I'll get 401, not 403, because the controller has rescue_from CanCan::AccessDenied, with: :unauthorized. How can i get 403 in normal way?

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

1 participant