From dccd4146434c10ddb512d74fcfae98f44f643ac2 Mon Sep 17 00:00:00 2001 From: zuevav Date: Thu, 24 Sep 2026 18:04:20 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F:=20=D0=BA=D1=80=D0=B8=D0=BF=D1=82=D0=BE?= =?UTF-8?q?=D1=81=D0=B5=D1=80=D0=B2=D0=B8=D1=81=20=D1=81=D1=82=D0=B0=D0=B2?= =?UTF-8?q?=D0=B8=D1=82=D1=81=D1=8F=20=D1=81=D0=B0=D0=BC=20=D0=BF=D1=80?= =?UTF-8?q?=D0=B8=20=D0=BB=D1=8E=D0=B1=D0=BE=D0=B9=20=D0=BB=D0=B8=D1=86?= =?UTF-8?q?=D0=B5=D0=BD=D0=B7=D0=B8=D0=B8;=20=D0=BC=D0=BE=D0=B4=D1=83?= =?UTF-8?q?=D0=BB=D0=B8=20=D0=B2=D0=BD=D0=B5=20=D0=BB=D0=B8=D1=86=D0=B5?= =?UTF-8?q?=D0=BD=D0=B7=D0=B8=D0=B8=20=D0=B2=20=D1=81=D0=BF=D0=B8=D1=81?= =?UTF-8?q?=D0=BA=D0=B5=20=D0=BD=D0=B5=20=D0=BF=D0=BE=D0=BA=D0=B0=D0=B7?= =?UTF-8?q?=D1=8B=D0=B2=D0=B0=D1=8E=D1=82=D1=81=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_014FsEKyJrYF69Cj9ZXzFLRi --- internal/lkgateway/updater.go | 4 +++- internal/release/components.go | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/internal/lkgateway/updater.go b/internal/lkgateway/updater.go index 3782b2c..b780ab2 100644 --- a/internal/lkgateway/updater.go +++ b/internal/lkgateway/updater.go @@ -324,7 +324,9 @@ func updateComponentRows(rc *RuntimeConfig) ([]release.ComponentState, bool) { } r.Available = avail[r.Name] r.Update = r.Available != "" && (r.Present || r.Core) && (r.Installed == "" || release.IsNewer(r.Available, r.Installed)) - if r.Present || r.Core || r.Available != "" { + // Модуль, которого нет на сервере и нет в лицензии, не показываем: поставить его нельзя, + // а в списке он выглядит так, будто входит в поставку. + if r.Present || r.Core || (r.Available != "" && moduleAllowed(rc, r.Feature)) { out = append(out, r) } } diff --git a/internal/release/components.go b/internal/release/components.go index b39dc32..57b24ca 100644 --- a/internal/release/components.go +++ b/internal/release/components.go @@ -36,7 +36,9 @@ var Components = []Component{ // они переписываются командой «bj-installer refresh-system» — правки установки приезжают // обновлением, образ ISO пересобирать не нужно. {Name: "bj-installer", Title: "Установщик и системные файлы (службы, скрипты)", Path: "/usr/local/sbin/bj-installer", Exec: true, Core: true, Feature: "updates"}, - {Name: "crypto-service.jar", Title: "Криптосервис", Path: "/opt/bj/crypto-service.jar", Unit: "bj-crypto", Feature: "updates"}, + // Криптосервис нужен любой установке (подпись и проверка через Валидату), но в образ не входит: + // ставится с первым обновлением после ввода ключа — как выделенный из ядра модуль. + {Name: "crypto-service.jar", Title: "Криптосервис", Path: "/opt/bj/crypto-service.jar", Unit: "bj-crypto", FromCore: true, Feature: "updates"}, {Name: "bj-lk", Title: "Личный кабинет клиента", Path: "/opt/bj/bj-lk", Unit: "bj-lk", Exec: true, Feature: "web-cabinet"}, {Name: "bj-npr", Title: "Риск-монитор НПР / УДС", Path: "/opt/bj/bj-npr", Unit: "bj-npr", Exec: true, FromCore: true, Feature: "npr"}, {Name: "bj-quikexport", Title: "Экспорт QUIK", Path: "/opt/bj/bj-quikexport", Unit: "bj-quikexport", Exec: true, FromCore: true, Feature: "quik-export"},