Commit bad51a79 by Szabolcs Gelencser

Add circle policy.json and rule circle:template:create

parent d31bb288
{
"admin_or_owner": "is_admin:True or (role:admin and is_admin_project:True) or project_id:%(project_id)s",
"default": "rule:admin_or_owner",
"template:create": ""
}
\ No newline at end of file
...@@ -561,6 +561,7 @@ POLICY_FILES = { ...@@ -561,6 +561,7 @@ POLICY_FILES = {
'volume': 'cinder_policy.json', 'volume': 'cinder_policy.json',
'image': 'glance_policy.json', 'image': 'glance_policy.json',
'network': 'neutron_policy.json', 'network': 'neutron_policy.json',
'circle': 'circle_policy.json',
} }
# Services for which horizon has extra policies are defined # Services for which horizon has extra policies are defined
# in POLICY_DIRS by default. # in POLICY_DIRS by default.
......
...@@ -507,7 +507,7 @@ class SaveAsTemplateOperation(InstanceOperation): ...@@ -507,7 +507,7 @@ class SaveAsTemplateOperation(InstanceOperation):
"template (and to the networks it uses) will be able to " "template (and to the networks it uses) will be able to "
"start an instance of it.") "start an instance of it.")
accept_states = ('SHUTOFF', 'ACTIVE') # TODO: try other states accept_states = ('SHUTOFF', 'ACTIVE') # TODO: try other states
# os_policy_actions = (("compute", "compute:stop"),) os_policy_actions = (("circle", "template:create"),)
@staticmethod @staticmethod
def _rename(name): def _rename(name):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment