1.1 KiB
1.1 KiB
Expression Policy
Expression Policies allows you to write custom Policy Logic using Jinja2 Templating language.
For a language reference, see here.
The following objects are passed into the variable:
request: A PolicyRequest object, which has the following properties:pb_is_sso_flow: Boolean which is true if request was initiated by authenticating through an external Provider.pb_is_group_member(user, group_name): Function which checks ifuseris member of a Group with Namegorup_name.
There are also the following custom filters available:
regex_match(regex): Return True if value matchesregexregex_replace(regex, repl): Replace string matched byregexwithrepl