-
-
Notifications
You must be signed in to change notification settings - Fork 631
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
STI parent access denied after adding cannot on child #768
Comments
There is currently an open pull request: #689 which should fix this issue. |
Seems that this issue is not still fixed.
If we have Child inherited from Parent using STI, this would not pass. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps to reproduce
We have the following STI inheritance: Toyota < Car
Setting the rules:
Checking the roles:
can? :read, Car # results to false
Expected behavior
can? :read, Car # should be true
Because we granted an access to all types of Car except Toyota
Actual behavior
can? :read, Car # results to false
System configuration
Rails version: 7.0.2
Ruby version: 3.0.3
CanCanCan version: 3.3.0
The text was updated successfully, but these errors were encountered: