linotp.lib.policy.definitions module

static policy definitions

linotp.lib.policy.definitions.get_policy_definitions(scope: Optional[str] = None) Dict

cache the policy definitions access in the local request context.

as the evaluation of the policy definition is resource intensive we cache the outcome on a per request base.

Parameters

scope – select only a scope of the definitions

Returns

the policy definition dict

Sideeffect

the local request context is extendend by the dict of the policy definitions. As they are pretty stable, there is no interference expected