Check for "all" entities instead of "at least one"
See original GitHub issueHi,
I currently have this ability :
can("read", "User", { id: this.id });
Basically, every user in the app have the permission to read their own profile. But admins can read every profiles so, they have this ability
can("read", "User");
And everything is ok for individual profiles check.
But il also have a list of all users. And only admin can see this list.
The check can("read", "User");
returns true for both, because, as specified in the documentation, every user can read at least one user : themselves.
How can I check for “can read ALL users” ?
Thanks you in advance for response
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How to count entities with commands/check if there are only ...
Then, count all the entities you want by getting each entity to increase a score by 1. First command is repeating, others are...
Read more >Best way to check if object exists in Entity Framework? [closed]
If you don't want to execute SQL directly, the best way is to use Any(). This is because Any() will return as soon...
Read more >check from one entity's screen if another entity's attribute list ...
One other way to put it: I want to check if all the B values are equal to 2, and at least one...
Read more >[MC-121934] execute sub-commands only run (for each entity ...
This means, only if the @s[tag=test] returns at least one entity, for each entity of the first sub-command, the command will do something....
Read more >Querying data via the DbSet - Learn Entity Framework Core
The First , and FirstOrDefault methods are intended to be used to return one result from potentially many matches. If you expect at...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, i’ve got it!
Thank you very much for your help !
Help please: https://stackoverflow.com/questions/70584146/nest-js-authorization-with-casl-doesnt-work-as-expected