Merge branch 'bug/13917' into release/0.10.2
[ganeti_webmgr.git] / ganeti_web / templates / ganeti / users / profile.html
bloba72b1268e5c6cc70a3f1e3ae61e3992c996a4156
1 {% extends "user/profile.html" %}
3 {% block detail %}
4 {% with user.ssh_keys.all as keyslist %}
5 <h3>SSH Keys</h3>
6 {% include "ganeti/ssh_keys/list.html" %}
7 {% endwith %}
8 <br></br>
9 {% load object_permission_tags %}
10 {% if groups %}
11 <h3>Groups</h3>
12 <table id="op_users">
13 <tr>
14 <th>Group</th>
15 <th>Permissions</th>
16 <th></th>
17 </tr>
18 {% for group in groups %}
19 <tr id="user_{{group.id}}">
20 <td class="name">
21 {% if "admin" in user_detail|permissions:group or user_detail.is_superuser%}
22 <a href="{% url group-detail group.id %}">{{group.name}}</a>
23 {% else %}
24 {{group.name}}
25 {% endif %}
26 </td>
27 <td class="permissions">
28 {% if "admin" in user_detail|permissions:group or user_detail.is_superuser%}
29 <a href="{% url group-permissions group.id %}/user/{{user_detail.id}}" class="permissions" title="click to edit">
30 {% for permission in user_detail|permissions:group %}
31 {{permission}}{% if not forloop.last%}, {% endif %}
32 {% empty %}
33 <span class="none">None</span>
34 {% endfor %}
35 </a>
36 {% else %}
37 {% for permission in user_detail|permissions:group %}
38 {{permission}}{% if not forloop.last%}, {% endif %}
39 {% empty %}
40 <span class="none">None</span>
41 {% endfor %}
42 {% endif %}
43 </td>
44 <td></td>
45 </tr>
46 {% endfor %}
47 </table>
48 <br></br>
49 {% endif %}
50 {{permissions_template|safe}}
52 {% endblock %}