Skip to content
Snippets Groups Projects
Verified Commit 5aeda9cb authored by magicfelix's avatar magicfelix
Browse files

Fix permission names

parent ddf81aba
No related branches found
No related tags found
1 merge request!4Fix permission names
Pipeline #64424 passed with warnings
......@@ -27,10 +27,10 @@ view_seatingplan_predicate = has_person & (
add_perm("stoelindeling.view_seatingplan_rule", view_seatingplan_predicate)
# Add seating plan
add_seatingplan_predicate = view_seatingplans_predicate & has_global_perm(
create_seatingplan_predicate = view_seatingplans_predicate & has_global_perm(
"stoelindeling.add_seatingplan"
)
add_perm("stoelindeling.add_seatingplan_rule", add_seatingplan_predicate)
add_perm("stoelindeling.create_seatingplan_rule", create_seatingplan_predicate)
# Edit seating plan
edit_seatingplan_predicate = view_seatingplans_predicate & (
......
......@@ -9,8 +9,8 @@
{% block page_title %}{% blocktrans %}Seating plans{% endblocktrans %}{% endblock %}
{% block content %}
{% has_perm "stoelindeling.create_seating_plan_rule" user as can_create_seating_plan %}
{% if can_create_seating_plan %}
{% has_perm "stoelindeling.create_seatingplan_rule" user as can_create_seatingplan %}
{% if can_create_seatingplan %}
<a class="btn green waves-effect waves-light" href="{% url 'create_seating_plan' %}">
<i class="material-icons left iconify" data-icon="mdi:plus">add</i>
{% trans "Create seating plan" %}
......
......@@ -18,8 +18,8 @@
{% endblock %}
{% block content %}
{% has_perm "stoelindeling.edit_seating_plan_rule" user seating_plan as can_edit %}
{% has_perm "stoelindeling.delete_seating_plan_rule" user seating_plan as can_delete %}
{% has_perm "stoelindeling.edit_seatingplan_rule" user seating_plan as can_edit %}
{% has_perm "stoelindeling.delete_seatingplan_rule" user seating_plan as can_delete %}
{% if can_edit %}
<a class="btn waves-effect waves-light orange margin-bottom" href="{% url "edit_seating_plan" object.pk %}">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment