mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-24 15:15:22 +00:00
user.is_staff can do resize of all machines
This commit is contained in:
parent
d4158a33ee
commit
2ef672ffb5
2 changed files with 2 additions and 2 deletions
|
@ -318,7 +318,7 @@
|
||||||
<!-- Tab panes -->
|
<!-- Tab panes -->
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
<div role="tabpanel" class="tab-pane tab-pane-bordered active" id="resizevm">
|
<div role="tabpanel" class="tab-pane tab-pane-bordered active" id="resizevm">
|
||||||
{% if request.user.is_superuser or userinstace.is_change %}
|
{% if request.user.is_superuser or request.user.is_staff or userinstace.is_change %}
|
||||||
<form class="form-horizontal" method="post" role="form">{% csrf_token %}
|
<form class="form-horizontal" method="post" role="form">{% csrf_token %}
|
||||||
<p style="font-weight:bold;">{% trans "Logical host CPUs:" %} {{ vcpu_host }}</p>
|
<p style="font-weight:bold;">{% trans "Logical host CPUs:" %} {{ vcpu_host }}</p>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
|
@ -446,7 +446,7 @@ def instance(request, compute_id, vname):
|
||||||
msg = _("Please shutdow down your instance and then try again")
|
msg = _("Please shutdow down your instance and then try again")
|
||||||
error_messages.append(msg)
|
error_messages.append(msg)
|
||||||
|
|
||||||
if 'resize' in request.POST and (request.user.is_superuser or userinstace.is_change):
|
if 'resize' in request.POST and (request.user.is_superuser or request.user.is_staff or userinstace.is_change):
|
||||||
new_vcpu = request.POST.get('vcpu', '')
|
new_vcpu = request.POST.get('vcpu', '')
|
||||||
new_cur_vcpu = request.POST.get('cur_vcpu', '')
|
new_cur_vcpu = request.POST.get('cur_vcpu', '')
|
||||||
new_memory = request.POST.get('memory', '')
|
new_memory = request.POST.get('memory', '')
|
||||||
|
|
Loading…
Reference in a new issue