Add descriptions of base policies
Describe what "context_is_admin", "admin_or_owner", and "admin_api" are. Taken from Nova @ https://review.openstack.org/472622 Also removed an extra space. Change-Id: I3baba0147c6117c3b0b847ff58854ed3af54d88b
This commit is contained in:
parent
714139dd5c
commit
9febbefb05
@ -19,13 +19,17 @@ RULE_ADMIN_OR_OWNER = 'rule:admin_or_owner'
|
||||
RULE_ADMIN_API = 'rule:admin_api'
|
||||
|
||||
rules = [
|
||||
policy.RuleDefault('context_is_admin', 'role:admin'),
|
||||
policy.RuleDefault('context_is_admin', 'role:admin',
|
||||
description="Decides what is required for the "
|
||||
"'is_admin:True' check to succeed."),
|
||||
policy.RuleDefault('admin_or_owner',
|
||||
'is_admin:True or (role:admin and '
|
||||
'is_admin_project:True) or project_id:%(project_id)s'),
|
||||
'is_admin_project:True) or project_id:%(project_id)s',
|
||||
description="Default rule for most non-Admin APIs."),
|
||||
policy.RuleDefault('admin_api',
|
||||
'is_admin:True or (role:admin and '
|
||||
'is_admin_project:True)'),
|
||||
'is_admin_project:True)',
|
||||
description="Default rule for most Admin APIs."),
|
||||
]
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user