oshipka/vm_gen/templates/html/_permissions.html
2021-05-10 00:22:29 +02:00

42 lines
1.3 KiB
HTML

<table>
<tr>
<th></th>
<th>{{ _("Public") }}</th>
<th>{{ _("Logged") }}</th>
[%- if 'Ownable' in inherits %]
<th>{{ _("Owner") }}</th>
[%- endif %]
</tr>
{% for verb in ['list', 'get', 'update', 'delete'] %}
<tr>
<td>{{ verb }}</td>
{% for scope in ['public', 'logged'[%- if 'Ownable' in inherits %], 'owner'[%- endif %] ] %}
<td><input type="checkbox" id="[[ name ]]-{{ scope }}-{{ verb }}" checked="checked"/></td>
{% endfor %}
</tr>
{% endfor %}
</table>
<h2>Instance Permissions</h2>
<table>
<tr>
<th></th>
<th>{{ _("Public") }}</th>
<th>{{ _("Logged") }}</th>
[%- if 'Ownable' in inherits %]
<th>{{ _("Owner") }}</th>
[%- endif %]
</tr>
{% for column in [[ columns ]] %}
<tr>
<td>{{ column.name }}</td>
{% for scope in ['public', 'logged'[%- if 'Ownable' in inherits %], 'owner'[%- endif %] ] %}
<td>
<input type="checkbox" id="[[ name ]]-{{ column }}-{{ scope }}-read" checked="checked"/> r
<input type="checkbox" id="[[ name ]]-{{ column }}-{{ scope }}-write" checked="checked"/> w
</td>
{% endfor %}
</tr>
{% endfor %}
</table>