From 60690a28a95c8ab2c340359acb623002061b1cc5 Mon Sep 17 00:00:00 2001 From: Ayman Bagabas Date: Sun, 20 Nov 2022 15:24:30 -0500 Subject: [PATCH] fix(config): use access level strings --- config/config.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config/config.go b/config/config.go index 29b317ea2ca7d56a7b14dcf3bafa5f56e5e87ccd..85408497baace36d2146a647aaa749f72d51ae4f 100644 --- a/config/config.go +++ b/config/config.go @@ -20,6 +20,7 @@ import ( "github.com/charmbracelet/soft-serve/git" "github.com/charmbracelet/soft-serve/server/config" + gm "github.com/charmbracelet/soft-serve/server/git" "github.com/go-git/go-billy/v5/memfs" ggit "github.com/go-git/go-git/v5" "github.com/go-git/go-git/v5/plumbing/object" @@ -102,9 +103,9 @@ func NewConfig(cfg *config.Config) (*Config, error) { c.Source = rs // Grant read-write access when no keys are provided. if len(pks) == 0 { - anonAccess = "read-write" + anonAccess = gm.ReadWriteAccess.String() } else { - anonAccess = "read-only" + anonAccess = gm.ReadOnlyAccess.String() } if host == "" { displayHost = "localhost"