Include states in permission auditing

This commit is contained in:
Adarnof
2017-03-25 16:48:21 -04:00
parent 13b0dbc960
commit 54262a850d
4 changed files with 32 additions and 7 deletions

View File

@@ -33,6 +33,15 @@
{% include 'permissions_tool/audit_row.html' %}
{% endfor %}
{% endfor %}
{% for state in permission.states %}
{% for profile in state.userprofile_set.all %}
{% with profile.user as user %}
<tr>
{% include 'permissions_tool/audit_state_row.html' %}
</tr>
{% endwith %}
{% endfor %}
{% endfor %}
</tbody>
</table>
</div>

View File

@@ -0,0 +1,11 @@
{% load i18n %}
<tr>
<td>
{% if forloop.first %}
<b>{% trans 'State' %}: {{ state }}</b>
{% endif %}
</td>
<td>
{{ user }}
</td>
</tr>

View File

@@ -41,7 +41,7 @@
{% trans "Groups" %}
</th>
<th class="col-md-1">
{% trans "Groups Users" %}
{% trans "States" %}
</th>
</tr>
</thead>
@@ -66,10 +66,10 @@
{{ perm.users }}
</td>
<td class="{% if perm.groups > 0 %}info {% endif %}text-right">
{{ perm.groups }}
{{ perm.groups }} ({{ perm.group_users }})
</td>
<td class="{% if perm.group_users > 0 %}info {% endif %}text-right">
{{ perm.group_users }}
<td class="{% if perm.states > 0 %}info {% endif %}text-right">
{{ perm.states }} ({{ perm.state_users }})
</td>
</tr>
{% endfor %}