apmec.policy
Module¶apmec.policy.
FieldCheck
(kind, match)¶Bases: oslo_policy._checks.Check
apmec.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.
apmec.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. |
apmec.policy.
check_is_admin
(context)¶Verify context has admin rights according to policy settings.
apmec.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. |
apmec.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.
apmec.policy.
init
(conf=<oslo_config.cfg.ConfigOpts object>, policy_file=None)¶Init an instance of the Enforcer class.
apmec.policy.
log_rule_list
(match_rule)¶apmec.policy.
refresh
(policy_file=None)¶Reset policy and init a new instance of Enforcer.
apmec.policy.
reset
()¶apmec.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.