mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-27 03:51:08 +00:00
Adds permissions to templates
This commit is contained in:
parent
9209039761
commit
c396489dff
2 changed files with 6 additions and 4 deletions
|
@ -9,7 +9,7 @@
|
|||
<span>{% include 'snippets/book_titleby.html' with book=book %}</span>
|
||||
</h2>
|
||||
|
||||
{% if request.user.is_authenticated %}
|
||||
{% if request.user.is_authenticated and perms.bookwyrm.edit_book %}
|
||||
<div class="level-right">
|
||||
<a href="{{ book.id }}/edit">edit
|
||||
<span class="icon icon-pencil">
|
||||
|
|
|
@ -70,12 +70,14 @@
|
|||
<a href="/user-edit" class="navbar-item">
|
||||
Settings
|
||||
</a>
|
||||
<a href="/invite" class="navbar-item">
|
||||
Invites
|
||||
</a>
|
||||
<a href="/import" class="navbar-item">
|
||||
Import books
|
||||
</a>
|
||||
{% if perms.bookwyrm.create_invites %}
|
||||
<a href="/invite" class="navbar-item">
|
||||
Invites
|
||||
</a>
|
||||
{% endif %}
|
||||
<hr class="navbar-divider">
|
||||
<a href="/logout" class="navbar-item">
|
||||
Log out
|
||||
|
|
Loading…
Reference in a new issue