Skip to content

Can when fields are not specified #873

Answered by stalniy
Arcus16 asked this question in Q&A
Discussion options

You must be logged in to vote

What you want is flag/claim based permission checks. Let’s map what you did in casl to real world

If you have access to a room inside some building, do you then have access to the building itself? Yes because room is part of building and there is no way to enter room without accessing building.

This is how casl was designed and how it works.

Name is an attribute of Account, this is part of an Account, if you can update part of an Account it means you can update Account. Because when you update part of a whole, you update this whole. I believe it’s logical

If this is not desired, you have 2 options:

  • use another library
  • Don’t use attribute level checks

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Arcus16
Comment options

Answer selected by Arcus16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants