tacker.policy
Module¶tacker.policy.
FieldCheck
(kind, match)¶Bases: oslo_policy._checks.Check
tacker.policy.
OwnerCheck
(kind, match)¶Bases: oslo_policy._checks.Check
Resource ownership check.
This check verifies the owner of the current resource, or of another resource referenced by the one under analysis. In the former case it falls back to a regular GenericCheck, whereas in the latter case it leverages the plugin to load the referenced resource and perform the check.
tacker.policy.
check
(context, action, target, plugin=None, might_not_exist=False, pluralized=None)¶Verifies that the action is valid on the target in this context.
Parameters: |
|
---|---|
Returns: | Returns True if access is permitted else False. |
tacker.policy.
check_is_admin
(context)¶Verify context has admin rights according to policy settings.
tacker.policy.
enforce
(context, action, target, plugin=None, pluralized=None)¶Verifies that the action is valid on the target in this context.
Parameters: |
|
---|---|
Raises: | oslo_policy.policy.PolicyNotAuthorized – if verification fails. |
tacker.policy.
get_resource_and_action
(action, pluralized=None)¶Return resource and enforce_attr_based_check(boolean).
It is per resource and action extracted from api operation.
tacker.policy.
init
(conf=<oslo_config.cfg.ConfigOpts object>, policy_file=None)¶Init an instance of the Enforcer class.
tacker.policy.
log_rule_list
(match_rule)¶tacker.policy.
refresh
(policy_file=None)¶Reset policy and init a new instance of Enforcer.
tacker.policy.
reset
()¶tacker.policy.
set_rules
(policies, overwrite=True)¶Set rules based on the provided dict of rules.
Parameters: |
|
---|
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.