Commit b2cbfed7 authored by Michal Čihař's avatar Michal Čihař

Simplify permission checking

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent c13aa2a2
{% load i18n %}
{% for check in checks %}
<div data-href="{% url 'js-ignore-check' check_id=check.id %}" class="alert alert-{{ check.get_severity }} {% if perms_ignore_check %}alert-dismissable{% endif %} check tooltip-control" id="check-{{ check.id }}" title="{{ check.get_description }}">
{% if perms_ignore_check %}
<div data-href="{% url 'js-ignore-check' check_id=check.id %}" class="alert alert-{{ check.get_severity }} {% if perms.trans.ignore_check %}alert-dismissable{% endif %} check tooltip-control" id="check-{{ check.id }}" title="{{ check.get_description }}">
{% if perms.trans.ignore_check %}
<button type="button" class="close" data-dismiss="alert" title="{% blocktrans with check.get_check_display as check %}Ignore: {{ check }}{% endblocktrans %}">&times;</button>
{% endif %}
<a href="{{ check.get_doc_url }}" class="alert-link">{{ check.get_check_display }}</a>
......
......@@ -264,7 +264,6 @@ def show_message(tags, message):
def show_checks(checks, user):
return {
'checks': checks,
'perms_ignore_check': user.has_perm('trans.ignore_check'),
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment