Commit c99ddda2 by Guba Sándor

dashboard,storage: add proper permission

parent aed52db7
...@@ -104,7 +104,9 @@ class Disk(TimeStampedModel): ...@@ -104,7 +104,9 @@ class Disk(TimeStampedModel):
verbose_name_plural = _('disks') verbose_name_plural = _('disks')
permissions = ( permissions = (
('create_empty_disk', _('Can create an empty disk.')), ('create_empty_disk', _('Can create an empty disk.')),
('download_disk', _('Can download a disk.'))) ('download_disk', _('Can download a disk.')),
('resize_disk', _('Can resize a disk.'))
)
class DiskError(HumanReadableException): class DiskError(HumanReadableException):
admin_message = None admin_message = None
......
...@@ -215,7 +215,7 @@ class ResizeDiskOperation(InstanceOperation): ...@@ -215,7 +215,7 @@ class ResizeDiskOperation(InstanceOperation):
name = _("resize disk") name = _("resize disk")
description = _("Resize the virtual disk image. " description = _("Resize the virtual disk image. "
"Size must be greater value than the actual size.") "Size must be greater value than the actual size.")
required_perms = ('vm.resize_disk', ) required_perms = ('storage.resize_disk', )
accept_states = ('RUNNING', ) accept_states = ('RUNNING', )
async_queue = "localhost.man.slow" async_queue = "localhost.man.slow"
......
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