From 5b17be58c8c1314814cf1c7a5de771d9c3623462 Mon Sep 17 00:00:00 2001 From: Andrew Martinez Date: Fri, 8 Apr 2022 10:42:40 -0400 Subject: [PATCH] fixes admin permission not also checking default admin --- controller/env/appenv.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controller/env/appenv.go b/controller/env/appenv.go index 2c0396cfd..46c98b8dc 100644 --- a/controller/env/appenv.go +++ b/controller/env/appenv.go @@ -50,9 +50,9 @@ import ( "github.com/openziti/foundation/common/constants" "github.com/openziti/foundation/identity/identity" "github.com/openziti/foundation/metrics" - "github.com/openziti/storage/boltz" "github.com/openziti/foundation/util/errorz" "github.com/openziti/sdk-golang/ziti/config" + "github.com/openziti/storage/boltz" cmap "github.com/orcaman/concurrent-map" "github.com/xeipuuv/gojsonschema" "io" @@ -317,7 +317,7 @@ func (ae *AppEnv) FillRequestContext(rc *response.RequestContext) error { rc.ActivePermissions = append(rc.ActivePermissions, permissions.AuthenticatedPermission) } - if rc.Identity.IsAdmin { + if rc.Identity.IsAdmin || rc.Identity.IsDefaultAdmin { rc.ActivePermissions = append(rc.ActivePermissions, permissions.AdminPermission) } }