diff --git a/templates/wikipage.html b/templates/wikipage.html index 1ac06bd7..2bd39d64 100644 --- a/templates/wikipage.html +++ b/templates/wikipage.html @@ -43,7 +43,7 @@ Ultima modifica di {{ wiki_log.editor.username }} alle {{ wiki_log.timestamp.strftime('%Y-%m-%d %H:%M:%S %Z') }}{% if wiki_log.reason %}, motivo: {{ wiki_log.reason }}{% endif %} {% endif %} - {% if g.user %} + {% if g.user and not wiki_page.locked %}

Modifica

diff --git a/webserver.py b/webserver.py index c8f09661..9e5eb25d 100644 --- a/webserver.py +++ b/webserver.py @@ -260,6 +260,9 @@ def page_wiki(key: str): elif request.method == "POST": if not fl_g.user: return redirect(url_for("page_login")) + if wiki_page.locked: + abort(403) + return user = fl_g.session.query(db.Royal).filter_by(id=fl_g.user.id).one() new_content = request.form.get("content") # Create new page