Show blacklist station on the user page, allow for 2 click blacklisting and banning

This commit is contained in:
2011-03-14 15:26:25 +00:00
parent 6561ef5312
commit 304001d4c7
6 changed files with 131 additions and 10 deletions

View File

@@ -7,15 +7,31 @@
<h1>{{user.username}}'s Profile</h1>
<b>Username:</b> {{ user.username }}<br/>
<b>Email:</b> {{ user.email }}<br/>
<b>Groups:</b> {{ user.groups.all|join:", " }}<br/>
<a href="{% url sso.views.refresh_access user.id %}">Update Access</a><br/>
<p>
<li><b>Username:</b> {{ user.username }}</li>
<li><b>Active:</b> {{ user.is_active }}</li>
<li><b>Email:</b> {{ user.email }}</li>
<li><b>Groups:</b> {{ user.groups.all|join:", " }}</li>
{% if "hr"|installed %}
<li><b>Blacklist Status: {% if blacklisted %}<font color='red'>BLACKLISTED</font> ({{ blacklisted }} items){% else %}<font color='geen'>OK</font>{% endif %}</b></li>
{% endif %}
</p>
<p>
<div class="skill_controls">
<a href="{% url sso.views.refresh_access user.id %}">Update Access</a>
{% if "hr"|installed %}
{% if perms.hr.can_add_blacklist %}
<a href="{% url hr.views.blacklist_user user.id %}">Blacklist User</a>
{% endif %}
{% endif %}
</div>
</p>
{% if is_admin %}
<br/>
<h2>Service Accounts</h2>
{% if services %}
<h2>Service Accounts</h2>
<table>
<tr><th>Service</th><th>Username</th><th>Active</th></tr>
{% for acc in services %}