Skip to content

Commit

Permalink
Send alert when a link is accessed without permission.
Browse files Browse the repository at this point in the history
  • Loading branch information
ovidiugiorgi committed Feb 27, 2016
1 parent 4f7b9c3 commit 0eab059
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions wouso/resources/templates/cpanel/index.html
Expand Up @@ -132,10 +132,26 @@ <h4 class="text-center">Dashboard</h4>
{% url forum as url %}
<li {% if url in request.path %}class="active"{% endif %}><a href="{% url forum %}">Forum</a></li>
<!-- Games !-->
<h4 class="text-center">Games</h4>
{% for u, game in games_list.items %}
<li {% if u in request.path %}class="active"{% endif %}><a href="{% url status %}{{u}}">{{game}}</a></li>
{% endfor %}
<h4 class="text-center">Games</h4>
{% for u, game in games_list.items %}
{% ifnotequal game "Quest" %}
{% ifnotequal game "Special Quest" %}
<li {% if u in request.path %}class="active"{% endif %}><a href="{% url status %}{{u}}">{{game}}</a></li>
{% else %}
{% if perms.specialquest.change_specialquest %}
<li {% if u in request.path %}class="active"{% endif %}><a href="{% url status %}{{u}}">{{game}}</a></li>
{% else %}
<li {% if u in request.path %}class="active"{% endif %}><a href="#" onclick="alert('You need specialquest permission!')">{{game}}</a></li>
{% endif %}
{% endifnotequal %}
{% else %}
{% if perms.quest.change_questuser %}
<li {% if u in request.path %}class="active"{% endif %}><a href="{% url status %}{{u}}">{{game}}</a></li>
{% else %}
<li {% if u in request.path %}class="active"{% endif %}><a href="#" onclick="alert('You need quest permission!')">{{game}}</a></li>
{% endif %}
{% endifnotequal %}
{% endfor %}
<!-- Customization !-->
{% if user.is_staff or user.is_superuser %}
<h4 class="text-center">Configuration</h4>
Expand Down

0 comments on commit 0eab059

Please sign in to comment.