From 62e2d5cacc058d94cbbebd5936ac7f944578f3c0 Mon Sep 17 00:00:00 2001 From: Ayman Bagabas Date: Wed, 7 Jan 2026 13:17:25 -0500 Subject: [PATCH] fix(ssh): ui: respect anon-access setting for the ui Fixes: https://github.com/charmbracelet/soft-serve/issues/759 --- pkg/ssh/session.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkg/ssh/session.go b/pkg/ssh/session.go index c89d913f24d85cf804910a5aef206f84ad394833..295542d5ef6d1196d46d11ac751416516869d3b9 100644 --- a/pkg/ssh/session.go +++ b/pkg/ssh/session.go @@ -45,11 +45,12 @@ func SessionHandler(s ssh.Session) *tea.Program { initialRepo := "" if len(cmd) == 1 { initialRepo = cmd[0] - auth := be.AccessLevelByPublicKey(ctx, initialRepo, s.PublicKey()) - if auth < access.ReadOnlyAccess { - wish.Fatalln(s, proto.ErrUnauthorized) - return nil - } + } + + auth := be.AccessLevelByPublicKey(ctx, initialRepo, s.PublicKey()) + if auth < access.ReadOnlyAccess { + wish.Fatalln(s, proto.ErrUnauthorized) + return nil } opts := bm.MakeOptions(s)