Parameters: |
- enforcer (
RBACEnforcer ) – A pre-instantiated Enforcer object (optional)
- action (str) – the name of the rule/policy enforcement to be checked
against, e.g. identity:get_user (optional may be
replaced by decorating the method/function with
policy_enforcer_action.
- target_attr (dict) – complete override of the target data. This will
replace all other generated target data meaning
member_target_type and member_target are
ignored. This will also prevent extraction of
data from the X-Subject-Token. The target dict
should contain a series of key-value pairs such
as {‘user’: user_ref_dict}.
- member_target_type (str) – the type of the target, e.g. ‘user’. Both
this and member_target must be passed if
either is passed.
- member_target (dict) – the (dict form) reference of the member object.
Both this and member_target_type must be passed
if either is passed.
- filters (iterable) – A variable number of optional string filters, these are
used to extract values from the query params. The
filters are added to the reques data that is passed to
the enforcer and may be used to determine policy
action. In practice these are mainly supplied in the
various “list” APIs and are un-used in the default
supplied policies.
|