So I've use CASL.js before and they have this thin...
# help
y
So I've use CASL.js before and they have this thing where you can query if X can do Y to any Z. Does Cerbos have such a thing?
Basically instead of calling Cerbos and saying hey, can "Yusuf" really "read" Article "How to cook noodles" I want to just: can "Yusuf" "read" any "Article"?
The reason I ask is that it allows rejecting the request much much earlier than hitting the DB to fetch the data only to make a decision on that
a
Hi Yousef, yep, I think you could use the plan resources API to achieve this. If the principal cannot perform the action on any resource, then the query plan you get back will have
KIND_ALWAYS_DENIED
.
y
Got it, thanks!