Commit 1bb04667 by Czémán Arnold

dashboard: remove unnecessary url entry

vm: fix required permissions
parent 8d1075f7
Pipeline #183 passed with stage
in 0 seconds
...@@ -1445,7 +1445,7 @@ class ToggleBootMenuForm(forms.ModelForm): ...@@ -1445,7 +1445,7 @@ class ToggleBootMenuForm(forms.ModelForm):
helper = FormHelper() helper = FormHelper()
helper.form_show_labels = True helper.form_show_labels = True
helper.form_action =\ helper.form_action =\
reverse_lazy("dashboard.views.vm-toggle-boot-menu", reverse_lazy("dashboard.instance.op.toggle_bootmenu",
kwargs={'pk': self.instance.pk}) kwargs={'pk': self.instance.pk})
return helper return helper
......
...@@ -42,7 +42,7 @@ from .views import ( ...@@ -42,7 +42,7 @@ from .views import (
ConnectCommandDelete, ConnectCommandDetail, ConnectCommandCreate, ConnectCommandDelete, ConnectCommandDetail, ConnectCommandCreate,
StoreList, store_download, store_upload, store_get_upload_url, StoreRemove, StoreList, store_download, store_upload, store_get_upload_url, StoreRemove,
store_new_directory, store_refresh_toplist, store_new_directory, store_refresh_toplist,
VmTraitsUpdate, VmRawDataUpdate, VmToggleBootMenuUpdate, VmTraitsUpdate, VmRawDataUpdate,
GroupPermissionsView, GroupPermissionsView,
LeaseAclUpdateView, LeaseAclUpdateView,
toggle_template_tutorial, toggle_template_tutorial,
...@@ -113,9 +113,6 @@ urlpatterns = patterns( ...@@ -113,9 +113,6 @@ urlpatterns = patterns(
name='dashboard.views.vm-traits'), name='dashboard.views.vm-traits'),
url(r'^vm/(?P<pk>\d+)/raw_data/$', VmRawDataUpdate.as_view(), url(r'^vm/(?P<pk>\d+)/raw_data/$', VmRawDataUpdate.as_view(),
name='dashboard.views.vm-raw-data'), name='dashboard.views.vm-raw-data'),
url(r'^vm/(?P<pk>\d+)/toggle_boot_menu/$',
VmToggleBootMenuUpdate.as_view(),
name='dashboard.views.vm-toggle-boot-menu'),
url(r'^vm/(?P<pk>\d+)/toggle_tutorial/$', toggle_template_tutorial, url(r'^vm/(?P<pk>\d+)/toggle_tutorial/$', toggle_template_tutorial,
name='dashboard.views.vm-toggle-tutorial'), name='dashboard.views.vm-toggle-tutorial'),
......
...@@ -1408,7 +1408,7 @@ class ToggleBootMenuOperation(InstanceOperation): ...@@ -1408,7 +1408,7 @@ class ToggleBootMenuOperation(InstanceOperation):
name = _("toggle boot menu") name = _("toggle boot menu")
description = _("Turn on/off boot menu.") description = _("Turn on/off boot menu.")
acl_level = "owner" acl_level = "owner"
required_perms = ('vm.change_resources', ) required_perms = ('vm.toggle_boot_menu', )
accept_states = ('STOPPED', 'PENDING', 'RUNNING') accept_states = ('STOPPED', 'PENDING', 'RUNNING')
def _operation(self, user, activity, boot_menu): def _operation(self, user, activity, boot_menu):
......
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