add user-permission management

This commit is contained in:
Cervinko Cera
2016-04-27 10:35:23 +02:00
parent 5d6f18f4c3
commit c7b7b3866e
7 changed files with 257 additions and 119 deletions
+14 -2
View File
@@ -23,8 +23,20 @@
</div>
{% if g.user and g.user.role and not profile %}
<div class="form-group">
<label for="user_role">Admin user</label>
<input type="checkbox" name="admin_user" id="admin_user" {% if content.role %}checked{% endif %}>
<label for="admin_role">Admin user</label>
<input type="checkbox" name="admin_role" id="admin_role" {% if content.role_admin() %}checked{% endif %}>
</div>
<div class="form-group">
<label for="download_role">Allow Downloads</label>
<input type="checkbox" name="download_role" id="download_role" {% if content.role_download() %}checked{% endif %}>
</div>
<div class="form-group">
<label for="upload_role">Allow Uploads</label>
<input type="checkbox" name="upload_role" id="upload_role" {% if content.role_upload() %}checked{% endif %}>
</div>
<div class="form-group">
<label for="edit_role">Allow Edit</label>
<input type="checkbox" name="edit_role" id="edit_role" {% if content.role_edit() %}checked{% endif %}>
</div>
{% endif %}
{% if g.user and g.user.role and not profile and not new_user %}