You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi everyone, I'm having a few issues using cancancan with graphql-ruby, I've opened a issue on that project too but I'm here to ask if this is the expected behaviour and if you can suggest a way to handle it.
{search: Search.new,# an active record modelconfiguration: {my_field: 1}}
I receive the hash inside the Ability block that should check permissions on the Search type
can:read,Searchdo |search|
# search is a Hash instead of a Searchend
because the code is changing the subject using subject = subject.values.first if subject.class == Hash but it passes the old subject to the validation block
Steps to reproduce
this code shows the issue, it will print Hash since we are receiving a Hash instead of a Search
Hi everyone, I'm having a few issues using cancancan with graphql-ruby, I've opened a issue on that project too but I'm here to ask if this is the expected behaviour and if you can suggest a way to handle it.
issue on graphql-ruby
When I check permissions this hash:
I receive the hash inside the Ability block that should check permissions on the Search type
because the code is changing the subject using
subject = subject.values.first if subject.class == Hash
but it passes the old subject to the validation blockSteps to reproduce
this code shows the issue, it will print Hash since we are receiving a Hash instead of a Search
Expected behavior
I expected the
can :read, Search
to be called with a SearchActual behavior
can :read, Search
is being called with a HashSystem configuration
Rails version:
6.1.7
Ruby version:
3.0.2
CanCanCan version
cancancan 3.4.0
The text was updated successfully, but these errors were encountered: