Skip to content

Commit

Permalink
Prevent creating a public shelf without permission
Browse files Browse the repository at this point in the history
  • Loading branch information
OzzieIsaacs committed Jan 18, 2022
1 parent 6bf0753 commit 0c0313f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cps/shelf.py
Expand Up @@ -248,7 +248,7 @@ def create_edit_shelf(shelf, page_title, page, shelf_id=False):
if not current_user.role_edit_shelfs() and to_save.get("is_public") == "on":
flash(_(u"Sorry you are not allowed to create a public shelf"), category="error")
return redirect(url_for('web.index'))
is_public = 1 if to_save.get("is_public") else 0
is_public = 1 if to_save.get("is_public") == "on" else 0
if config.config_kobo_sync:
shelf.kobo_sync = True if to_save.get("kobo_sync") else False
if shelf.kobo_sync:
Expand Down

0 comments on commit 0c0313f

Please sign in to comment.