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>
|
<span>{% include 'snippets/book_titleby.html' with book=book %}</span>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
{% if request.user.is_authenticated %}
|
{% if request.user.is_authenticated and perms.bookwyrm.edit_book %}
|
||||||
<div class="level-right">
|
<div class="level-right">
|
||||||
<a href="{{ book.id }}/edit">edit
|
<a href="{{ book.id }}/edit">edit
|
||||||
<span class="icon icon-pencil">
|
<span class="icon icon-pencil">
|
||||||
|
|
|
@ -70,12 +70,14 @@
|
||||||
<a href="/user-edit" class="navbar-item">
|
<a href="/user-edit" class="navbar-item">
|
||||||
Settings
|
Settings
|
||||||
</a>
|
</a>
|
||||||
<a href="/invite" class="navbar-item">
|
|
||||||
Invites
|
|
||||||
</a>
|
|
||||||
<a href="/import" class="navbar-item">
|
<a href="/import" class="navbar-item">
|
||||||
Import books
|
Import books
|
||||||
</a>
|
</a>
|
||||||
|
{% if perms.bookwyrm.create_invites %}
|
||||||
|
<a href="/invite" class="navbar-item">
|
||||||
|
Invites
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
<hr class="navbar-divider">
|
<hr class="navbar-divider">
|
||||||
<a href="/logout" class="navbar-item">
|
<a href="/logout" class="navbar-item">
|
||||||
Log out
|
Log out
|
||||||
|
|
Loading…
Reference in a new issue