Use UserName instead of Id to check if identity used is a service principal (#924)

## Changes
Use UserName instead of Id to check if identity used is a service
principal
This commit is contained in:
Andrew Nester 2023-10-26 16:58:16 +02:00 committed by GitHub
parent 19e00d2d47
commit 6f22ae8696
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -176,7 +176,7 @@ func (m *processTargetMode) Apply(ctx context.Context, b *bundle.Bundle) error {
}
return transformDevelopmentMode(b)
case config.Production:
isPrincipal := auth.IsServicePrincipal(b.Config.Workspace.CurrentUser.Id)
isPrincipal := auth.IsServicePrincipal(b.Config.Workspace.CurrentUser.UserName)
return validateProductionMode(ctx, b, isPrincipal)
case "":
// No action