Make adding a description require edit perms

This commit is contained in:
Mouse Reeve 2020-11-28 08:29:55 -08:00
parent 78fa949237
commit b2ca67a67c
2 changed files with 2 additions and 1 deletions

View file

@ -57,7 +57,7 @@
{% include 'snippets/trimmed_text.html' with full=book|book_description %}
{% if request.user.is_authenticated and not book|book_description %}
{% if request.user.is_authenticated and perms.bookwyrm.edit_book and not book|book_description %}
<div>
<input class="toggle-control" type="radio" name="add-description" id="hide-description" checked>
<div class="toggle-content hidden">

View file

@ -268,6 +268,7 @@ def upload_cover(request, book_id):
@login_required
@permission_required('bookwyrm.edit_book', raise_exception=True)
def add_description(request, book_id):
''' upload a new cover '''
if not request.method == 'POST':