From cd9cd739beed5a37613963f6ee1b5e8e2bf9470e Mon Sep 17 00:00:00 2001 From: gitadmin Date: Fri, 14 Nov 2025 14:23:28 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D1=81=D0=BB=D0=BE=D0=B2=D0=B8=D1=8F=20?= =?UTF-8?q?=D0=BE=D1=82=D0=BE=D0=B1=D1=80=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F=20=D0=B8=20=D0=BD=D0=B0=D0=B7=D0=B2=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F=20=D0=BA=D0=BD=D0=BE=D0=BF=D0=BE=D0=BA=20=D0=BD=D0=B0=20?= =?UTF-8?q?=D0=B7=D0=B0=D0=BA=D0=BB=D0=B0=D0=B4=D0=BA=D0=B5=20"=D0=A1?= =?UTF-8?q?=D0=BE=D0=B1=D1=8B=D1=82=D0=B8=D1=8F"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db_edit.py | 7 +++++++ templates/index.html | 11 +++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/db_edit.py b/db_edit.py index 521ef5e..8b41a39 100644 --- a/db_edit.py +++ b/db_edit.py @@ -1019,6 +1019,13 @@ def api_publish_post(post_id): @login_required def api_run_zk_rescan(): try: + # Проверка режима работы + workmode = os.getenv('WORKMODE', 'ZILANT') + if workmode != 'ZILANT': + error_msg = "Рескан Зилант-сервера доступен только в режиме ZILANT" + log_event(error_msg) + return jsonify({'success': False, 'error': error_msg}), 403 + load_json_all() log_event("Рескан Зилант-сервера выполнен успешно") return jsonify({'success': True}) diff --git a/templates/index.html b/templates/index.html index ef7ba43..3c112a7 100644 --- a/templates/index.html +++ b/templates/index.html @@ -560,15 +560,17 @@ + {% if g.workmode == 'ZILANT' %} + {% endif %} {% if g.workmode == 'VOLK' %} {% endif %}