Merge pull request #214 from mouse-reeve/user-permissions

Adds user permissions and groups
This commit is contained in:
Mouse Reeve
2020-10-02 13:55:59 -07:00
committed by GitHub
5 changed files with 74 additions and 21 deletions

View File

@ -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">

View File

@ -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