From 5035c6fe2f5d9ef61ae65bac659df62fd75764c8 Mon Sep 17 00:00:00 2001 From: Commander1024 Date: Sun, 11 Oct 2020 09:46:15 +0200 Subject: [PATCH] Implemented tag that checks if user is authorized. --- .../lostplaces/templates/place/place_detail.html | 9 +++++---- django_lostplaces/lostplaces/templatetags/lostplaces.py | 5 +++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/django_lostplaces/lostplaces/templates/place/place_detail.html b/django_lostplaces/lostplaces/templates/place/place_detail.html index 6d91170..3bc92fe 100644 --- a/django_lostplaces/lostplaces/templates/place/place_detail.html +++ b/django_lostplaces/lostplaces/templates/place/place_detail.html @@ -4,6 +4,7 @@ {% load thumbnail %} {% load svg_icon %} +{% load lostplaces %} {% block additional_head %} @@ -36,10 +37,8 @@
- {% url 'place_tag_submit' place_id=place.id as tag_submit_url%} {% include 'partials/tagging.html' with config=tagging_config %} -
@@ -63,7 +62,8 @@ {{photo_album.label}} - {% if user.explorer == photo_album.submitted_by or user.explorer == place.submitted_by %} + {% can_modify_place_asset photo_album request as authorized %} + {% if authorized %}