Use Policy.SimpleCheck inside an expr
Right now I have the following policy:
As you can see, the second policy checks if the actor is an investor and forbids access if it is not.
Now I want to change that policy a little bit, I want to allow it not only if it is an investor, but also if it is an agent.
I could just create an
IsInvestorOrAgent
SimpleCheck
, but I would prefer to just create an IsAgent
and use it inside an expression with both checks, something like this:
Right now this doesn't seem to work though4 Replies
Correct, you can’t use checks that way
In an expression like that I mean
What would you suggest as an alternative in this case? Create an
IsInvestorOrAgent
check?That, or reword your policies/checks to mix them properly. For instance, add an
authorize_if
for both
And then remove the authorize_if always
Got it, thanks!