Policy¶
-
class
PolicyEndpoint
(req_handler)¶ -
task
items
()¶ List the policies on the server.
Returns: set – Policy names
-
task
read
(name)¶ Read a single policy.
Parameters: name (str) – The policy name Returns: Rules – The rules
-
task
write
(name, rules)¶ Sets rules to the given name.
Once a policy is updated, it takes effect immediately to all associated users.
Parameters: Returns: bool – Rules has been written
-
task
delete
(name)¶ Delete the rules with the given name.
This will immediately affect all associated users. When a user is associated with a policy that doesn’t exist, it is identical to not being associated with that policy.
Parameters: name (str) – The policy name Returns: bool – Policy does not exists in storage
-
task
write_path
(name, path, policy)¶ Set one rule to a given policy
Parameters: Returns: bool – Path has been written
-
task