When defining rules in CASL you can state a User's abilities for which Subject (Model) based on the subject's attributes.
In the below example from the docs you're defining that the user can read an Article if it's 'attribute' published is false.
I would like to know if I can also add User attributes in the conditions, whereby for example you can only read an Article if published === false && user.is_active === true.
The example from the docs below shows this being done with an if statement before defining the rules (obviously not a feature of CASL, just standard javascript conditional).
Can this be done on the rule somehow, in the can function call, as let's say a passed parameter?
CASL states...
CASL implements Attribute Based Access Control
And I think ABAC is based on attributes other than just the Object being accessed. Like attributes for the User or Environment. See here and here.