mirror of
https://github.com/logos-co/open-law.git
synced 2025-02-28 22:40:37 +00:00
hotfix: access to book.settings
This commit is contained in:
parent
0611736106
commit
4a2dc917bb
@ -197,6 +197,10 @@ def interpretation_view(
|
|||||||
@login_required
|
@login_required
|
||||||
def settings(book_id: int):
|
def settings(book_id: int):
|
||||||
book: m.Book = db.session.get(m.Book, book_id)
|
book: m.Book = db.session.get(m.Book, book_id)
|
||||||
|
if book.owner != current_user:
|
||||||
|
log(log.INFO, "User: [%s] is not owner of book: [%s]", current_user, book)
|
||||||
|
flash("You are not owner of this book!", "danger")
|
||||||
|
return redirect(url_for("book.my_books"))
|
||||||
|
|
||||||
return render_template(
|
return render_template(
|
||||||
"book/settings.html", book=book, roles=m.BookContributor.Roles
|
"book/settings.html", book=book, roles=m.BookContributor.Roles
|
||||||
|
Loading…
x
Reference in New Issue
Block a user