From 05d02f22e67e80b911ccb4db56047734af0f4b26 Mon Sep 17 00:00:00 2001 From: zuevav Date: Fri, 18 Sep 2026 15:00:25 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9A=D0=B0=D0=B1=D0=B8=D0=BD=D0=B5=D1=82:=20?= =?UTF-8?q?=D0=BB=D0=BE=D0=B3=D0=BE=D1=82=D0=B8=D0=BF=20=D0=B2=D0=B5=D0=B4?= =?UTF-8?q?=D1=91=D1=82=20=D0=BD=D0=B0=20=D1=82=D0=B0=D0=B1=D0=BB=D0=BE;?= =?UTF-8?q?=20=D1=81=D0=BE=D1=82=D1=80=D1=83=D0=B4=D0=BD=D0=B8=D0=BA=20?= =?UTF-8?q?=D0=B1=D0=B5=D0=B7=20=D0=BE=D1=82=D0=BA=D1=80=D1=8B=D1=82=D0=BE?= =?UTF-8?q?=D0=B3=D0=BE=20=D0=BA=D0=BB=D0=B8=D0=B5=D0=BD=D1=82=D0=B0=20?= =?UTF-8?q?=D1=81=20=D1=82=D0=B0=D0=B1=D0=BB=D0=BE=20=D0=BF=D0=BE=D0=BF?= =?UTF-8?q?=D0=B0=D0=B4=D0=B0=D0=B5=D1=82=20=D0=B2=20=D1=81=D0=BF=D0=B8?= =?UTF-8?q?=D1=81=D0=BE=D0=BA=20=D0=BA=D0=BB=D0=B8=D0=B5=D0=BD=D1=82=D0=BE?= =?UTF-8?q?=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01Q4YVo4UMopqT5DzicqpPjL --- modules/lk/lk.go | 7 +++++++ modules/lk/templates.go | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/lk/lk.go b/modules/lk/lk.go index fc3aed9..e360ee8 100644 --- a/modules/lk/lk.go +++ b/modules/lk/lk.go @@ -615,6 +615,13 @@ func (s *Server) buildHandler() http.Handler { http.Redirect(w, r, "/login", http.StatusSeeOther) return } + // Сотрудник, не открывший кабинет клиента: его «табло» — список клиентов. + if c, err := r.Cookie("bj_lk_admin"); err == nil && c.Value == "1" { + if as, err := r.Cookie("bj_lk_as"); err != nil || as.Value == "" { + http.Redirect(w, r, "/clients", http.StatusSeeOther) + return + } + } pf, err := s.portfolio(r, sess) if err != nil { s.render(w, r, "board", map[string]any{"Nav": "b", "Error": err.Error()}) diff --git a/modules/lk/templates.go b/modules/lk/templates.go index 6388f45..3d63293 100644 --- a/modules/lk/templates.go +++ b/modules/lk/templates.go @@ -93,7 +93,7 @@ input[type=checkbox]{width:20px;min-height:20px;height:20px} {{define "mark"}}{{end}} {{define "nav"}}
- {{template "mark" .}}{{.Title}} + {{template "mark" .}}{{.Title}}