Refactored the permissions registration, checking and definition
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
{% load permission_tags %}
|
||||
{% load navigation_tags %}
|
||||
|
||||
{% with link.permissions.namespace as namespace %}
|
||||
{% with link.permissions.permissions as permissions %}
|
||||
{% with link.permissions as permissions %}
|
||||
{% with link.condition as condition %}
|
||||
|
||||
{% check_permissions request.user namespace permissions %}
|
||||
{% check_permissions request.user permissions %}
|
||||
{% if permission %}
|
||||
{% evaluate_link condition as conditional_display %}
|
||||
{% if conditional_display %}
|
||||
@@ -19,4 +18,3 @@
|
||||
|
||||
{% endwith %}
|
||||
{% endwith %}
|
||||
{% endwith %}
|
||||
|
||||
Reference in New Issue
Block a user