Else statement

This commit is contained in:
gamab 2024-09-03 14:36:59 +02:00
parent 6cf1efdcc4
commit 21220c2cca
No known key found for this signature in database
GPG Key ID: 88D8810B587562C1

View File

@ -15,14 +15,14 @@ func NewNamespaceAuthorizer(cfg *setting.Cfg) authzlib.AuthorizeFunc {
claims.CloudNamespaceFormatter,
authzlib.WithIDTokenNamespaceAccessCheckerOption(true),
)
} else {
na = authzlib.NewNamespaceAccessChecker(
claims.OrgNamespaceFormatter,
authzlib.WithDisableAccessTokenNamespaceAccessCheckerOption(),
authzlib.WithIDTokenNamespaceAccessCheckerOption(true),
)
}
na = authzlib.NewNamespaceAccessChecker(
claims.OrgNamespaceFormatter,
authzlib.WithDisableAccessTokenNamespaceAccessCheckerOption(),
authzlib.WithIDTokenNamespaceAccessCheckerOption(true),
)
return authzlib.NamespaceAuthorizationFunc(
na,
authzlib.MetadataStackIDExtractor(authzlib.DefaultStackIDMetadataKey),