1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-24 15:15:22 +00:00

staff users are allowed to change vnc settings of instances

This commit is contained in:
Ing. Jan Krcmar 2019-04-09 11:19:31 +02:00 committed by catborise
parent 311f1b793e
commit 52fbe95e30
2 changed files with 3 additions and 3 deletions

View file

@ -537,7 +537,7 @@
</a>
</li>
{% endif %}
{% if request.user.is_superuser or userinstance.is_vnc %}
{% if request.user.is_superuser or request.user.is_staff or userinstance.is_vnc %}
<li role="presentation">
<a href="#vncsettings" aria-controls="vncsettings" role="tab" data-toggle="tab">
{% trans "VNC" %}
@ -963,7 +963,7 @@
<div class="clearfix"></div>
</div>
{% endif %}
{% if request.user.is_superuser or userinstance.is_vnc %}
{% if request.user.is_superuser or request.user.is_staff or userinstance.is_vnc %}
<div role="tabpanel" class="tab-pane tab-pane-bordered" id="vncsettings">
<p>{% trans "To set console's type, shutdown the instance." %}</p>
<form class="form-horizontal" method="post" role="form">{% csrf_token %}

View file

@ -645,7 +645,7 @@ def instance(request, compute_id, vname):
addlogmsg(request.user.username, instance.name, msg)
return HttpResponseRedirect(request.get_full_path() + '#xmledit')
if request.user.is_superuser or userinstance.is_vnc:
if request.user.is_superuser or request.user.is_staff or userinstance.is_vnc:
if 'set_console_passwd' in request.POST:
if request.POST.get('auto_pass', ''):
passwd = randomPasswd()