Add policy_rules to flavors dashboard
This patch set adds in os_compute_api:os-flavor-manage policies in the appropriate dashboards. Change-Id: I3157aeaa916837b4f6258009dc643ab225e6ee17 Signed-off-by: Tin Lam <tin@irrational.io>
This commit is contained in:
parent
99ade30436
commit
140c22741e
@ -29,6 +29,8 @@ from openstack_dashboard import api
|
|||||||
|
|
||||||
|
|
||||||
class DeleteFlavor(tables.DeleteAction):
|
class DeleteFlavor(tables.DeleteAction):
|
||||||
|
policy_rules = (("compute", "os_compute_api:os-flavor-manage:delete"),)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def action_present(count):
|
def action_present(count):
|
||||||
return ungettext_lazy(
|
return ungettext_lazy(
|
||||||
@ -54,6 +56,7 @@ class CreateFlavor(tables.LinkAction):
|
|||||||
verbose_name = _("Create Flavor")
|
verbose_name = _("Create Flavor")
|
||||||
url = "horizon:admin:flavors:create"
|
url = "horizon:admin:flavors:create"
|
||||||
classes = ("ajax-modal",)
|
classes = ("ajax-modal",)
|
||||||
|
policy_rules = (("compute", "os_compute_api:os-flavor-manage:create"),)
|
||||||
icon = "plus"
|
icon = "plus"
|
||||||
|
|
||||||
|
|
||||||
@ -88,6 +91,7 @@ class ModifyAccess(tables.LinkAction):
|
|||||||
verbose_name = _("Modify Access")
|
verbose_name = _("Modify Access")
|
||||||
url = "horizon:admin:flavors:update"
|
url = "horizon:admin:flavors:update"
|
||||||
classes = ("ajax-modal",)
|
classes = ("ajax-modal",)
|
||||||
|
policy_rules = (("compute", "os_compute_api:os-flavor-manage:update"),)
|
||||||
icon = "pencil"
|
icon = "pencil"
|
||||||
|
|
||||||
def get_link_url(self, flavor):
|
def get_link_url(self, flavor):
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
The missing nova's os-flavors policy rules are added to the dashboard.
|
Loading…
Reference in New Issue
Block a user