linotp.lib.policy.manage module¶
static policy definitions
- exception linotp.lib.policy.manage.PolicyWarning¶
Bases:
Exception
- linotp.lib.policy.manage.create_policy_export_file(policy, filename)¶
This function takes a policy dictionary and creates an export file from it
- linotp.lib.policy.manage.deletePolicy(name, enforce=False)¶
Function to delete one named policy
- attributes:
name: (required) will only return the policy with the name
- linotp.lib.policy.manage.import_policies(policies)¶
import policies
- Parameters
policies – the policies as dict or a result of the parsed ConfigObj
- Returns
the number of the imported policies
- linotp.lib.policy.manage.setPolicy(policy)¶
define and store a policy definition
- Parameters
policy –
dict with the following keys:
name
action
scope
realm
user
time
client
- Returns
dict with the results of the stored entries