mirror of
https://github.com/retspen/webvirtcloud
synced 2026-12-03 09:26:03 +00:00
fix(accounts): owners given before one owner was the rule keep editable rights
With "Multiple Owner for VM" turned off after a VM was given two owners, changing either owner's rights (Delete the VM, say) was refused: the form's one-owner check counted the other owner. The check now applies to a new owner only, as its message says. The user and group forms showed the permissions by the English names the database keeps (Can clone instances, ...), in every language; they are named in the user's language now.
This commit is contained in:
parent
dde7672375
commit
35a5bbdb62
10 changed files with 151 additions and 100 deletions
|
|
@ -32,12 +32,12 @@
|
|||
</div>
|
||||
<div class="col-lg-9 form-section-fields">
|
||||
<div class="border-top">
|
||||
{% for box, help in form.permission_rows %}
|
||||
{% for box, name, help in form.permission_rows %}
|
||||
<div class="form-check form-switch border-bottom py-2 ps-5">
|
||||
<input id="{{ box.id_for_label }}" class="form-check-input" type="checkbox" role="switch" name="permissions"
|
||||
value="{{ box.data.value }}"{% if box.data.selected %} checked{% endif %}>
|
||||
<label class="form-check-label" for="{{ box.id_for_label }}">
|
||||
<span class="d-block">{{ box.data.value.instance.name }}</span>
|
||||
<span class="d-block">{{ name }}</span>
|
||||
<span class="small text-body-secondary">{{ help }}</span>
|
||||
</label>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -137,12 +137,12 @@
|
|||
<legend class="visually-hidden">{% trans "Own permissions" %}</legend>
|
||||
<p class="small text-body-secondary mb-2">{% trans "Off grants nothing here; it takes away nothing a group grants." %}</p>
|
||||
<div class="border-top">
|
||||
{% for box, help in user_form.permission_rows %}
|
||||
{% for box, name, help in user_form.permission_rows %}
|
||||
<div class="form-check form-switch border-bottom py-2 ps-5">
|
||||
<input id="{{ box.id_for_label }}" class="form-check-input" type="checkbox" role="switch" name="user_permissions"
|
||||
value="{{ box.data.value }}"{% if box.data.selected %} checked{% endif %}>
|
||||
<label class="form-check-label" for="{{ box.id_for_label }}">
|
||||
<span class="d-block">{{ box.data.value.instance.name }}</span>
|
||||
<span class="d-block">{{ name }}</span>
|
||||
<span class="small text-body-secondary">{{ help }}</span>
|
||||
</label>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue