[Migration] Custom Template Tag to check if a user is eligible to delete a place asset #22
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original https://git.mowoe.com/reverend/lostplaces-backend/issues/22 by @reverend from Sat, 26 Sep 2020 10:48:20 CEST
There should be a custom template tag that checks weather a user is the submitter of the current place or if the user is the submitter of the place asset in question. The template tag should open a scope, like a if statement. If the user is eligible then the content inside the scope should be rendered.
Comment by @Commander1024 from Mon, 28 Sep 2020 22:26:33 CEST
Do you mean something, that replaces e. g.:
{% if request.user and request.user.explorer == config.tagged_item.submitted_by %}
in tagging.html?
Comment by @Commander1024 from Sun, 11 Oct 2020 09:46:33 CEST
Done in
5035c6fe2f
, but I dunno - kinda more dirty than before -.-