mirror of https://github.com/databricks/cli.git
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:
parent
19e00d2d47
commit
6f22ae8696
|
@ -176,7 +176,7 @@ func (m *processTargetMode) Apply(ctx context.Context, b *bundle.Bundle) error {
|
||||||
}
|
}
|
||||||
return transformDevelopmentMode(b)
|
return transformDevelopmentMode(b)
|
||||||
case config.Production:
|
case config.Production:
|
||||||
isPrincipal := auth.IsServicePrincipal(b.Config.Workspace.CurrentUser.Id)
|
isPrincipal := auth.IsServicePrincipal(b.Config.Workspace.CurrentUser.UserName)
|
||||||
return validateProductionMode(ctx, b, isPrincipal)
|
return validateProductionMode(ctx, b, isPrincipal)
|
||||||
case "":
|
case "":
|
||||||
// No action
|
// No action
|
||||||
|
|
Loading…
Reference in New Issue