From c396489dff236097f26ca2ba30869b91b5bac96d Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 1 Oct 2020 13:09:37 -0700 Subject: [PATCH] Adds permissions to templates --- bookwyrm/templates/book.html | 2 +- bookwyrm/templates/layout.html | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/bookwyrm/templates/book.html b/bookwyrm/templates/book.html index 1d511184..5e9696fa 100644 --- a/bookwyrm/templates/book.html +++ b/bookwyrm/templates/book.html @@ -9,7 +9,7 @@ {% include 'snippets/book_titleby.html' with book=book %} - {% if request.user.is_authenticated %} + {% if request.user.is_authenticated and perms.bookwyrm.edit_book %}
edit diff --git a/bookwyrm/templates/layout.html b/bookwyrm/templates/layout.html index 829f781e..ab5b0615 100644 --- a/bookwyrm/templates/layout.html +++ b/bookwyrm/templates/layout.html @@ -70,12 +70,14 @@ Settings - - Invites - Import books + {% if perms.bookwyrm.create_invites %} + + Invites + + {% endif %} Log out