From 5f24657b4127b3ac0d758a47b57f35b9302ca438 Mon Sep 17 00:00:00 2001 From: Dmitry Mazurov Date: Mon, 22 Sep 2025 00:51:16 +0300 Subject: [PATCH] feat: Add user roles (#4133) --- .../ContainerActionsToolbar.vue | 4 +- .../LogViewer/MultiContainerActionToolbar.vue | 4 +- assets/stores/config.ts | 1 + docs/guide/authentication.md | 34 ++++++++++- docs/guide/supported-env-vars.md | 58 ++++++++++--------- internal/auth/proxy.go | 7 ++- internal/auth/roles.go | 42 ++++++++++++++ internal/auth/simple.go | 2 +- internal/auth/users.go | 11 +++- internal/support/cli/args.go | 1 + internal/support/cli/generate_command.go | 22 +++---- internal/web/actions.go | 8 +++ internal/web/auth_proxy_test.go | 4 +- internal/web/download.go | 8 +++ internal/web/index.go | 13 ++++- internal/web/terminal.go | 17 +++++- main.go | 50 ++++++++-------- 17 files changed, 207 insertions(+), 79 deletions(-) create mode 100644 internal/auth/roles.go diff --git a/assets/components/ContainerViewer/ContainerActionsToolbar.vue b/assets/components/ContainerViewer/ContainerActionsToolbar.vue index d43cc7cd..3964e14a 100644 --- a/assets/components/ContainerViewer/ContainerActionsToolbar.vue +++ b/assets/components/ContainerViewer/ContainerActionsToolbar.vue @@ -15,7 +15,7 @@ -
  • +
  • {{ $t("toolbar.download") }}
  • @@ -167,7 +167,7 @@ import LogAnalytics from "../LogViewer/LogAnalytics.vue"; import Terminal from "@/components/Terminal.vue"; const { showSearch } = useSearchFilter(); -const { enableActions, enableShell } = config; +const { enableActions, enableShell, enableDownload } = config; const { streamConfig, hasComplexLogs, levels } = useLoggingContext(); const showDrawer = useDrawer(); diff --git a/assets/components/LogViewer/MultiContainerActionToolbar.vue b/assets/components/LogViewer/MultiContainerActionToolbar.vue index 8fabb6ea..cd16b0db 100644 --- a/assets/components/LogViewer/MultiContainerActionToolbar.vue +++ b/assets/components/LogViewer/MultiContainerActionToolbar.vue @@ -15,7 +15,7 @@
  • -
  • +
  • {{ $t("toolbar.download") }}
  • @@ -88,7 +88,7 @@