mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-03 21:02:15 +00:00
chore: rename IAM to instance (#11351)
# Which Problems Are Solved In many cases IAM was used where instance was meant. # How the Problems Are Solved - Rename wrong usage of IAM to instance all over the code base. - Add an agents.md which explains the terms used in Zitadel's architecture. # Additional Context - closes #11280 --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: muhlemmer <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: Marco A. <[email protected]>
This commit is contained in:
co-authored by
Copilot
muhlemmer
Copilot
Marco A.
parent
67a02a6aeb
commit
5a2181bcec
@@ -22,7 +22,7 @@ func (c *Commands) ChangeDefaultLabelPolicy(ctx context.Context, policy *domain.
|
||||
}
|
||||
|
||||
if existingPolicy.State == domain.PolicyStateUnspecified || existingPolicy.State == domain.PolicyStateRemoved {
|
||||
return nil, zerrors.ThrowNotFound(nil, "INSTANCE-0K9dq", "Errors.IAM.LabelPolicy.NotFound")
|
||||
return nil, zerrors.ThrowNotFound(nil, "INSTANCE-0K9dq", "Errors.Instance.LabelPolicy.NotFound")
|
||||
}
|
||||
instanceAgg := InstanceAggregateFromWriteModel(&existingPolicy.LabelPolicyWriteModel.WriteModel)
|
||||
changedEvent, hasChanged := existingPolicy.NewChangedEvent(
|
||||
@@ -41,7 +41,7 @@ func (c *Commands) ChangeDefaultLabelPolicy(ctx context.Context, policy *domain.
|
||||
policy.DisableWatermark,
|
||||
policy.ThemeMode)
|
||||
if !hasChanged {
|
||||
return nil, zerrors.ThrowPreconditionFailed(nil, "INSTANCE-28fHe", "Errors.IAM.LabelPolicy.NotChanged")
|
||||
return nil, zerrors.ThrowPreconditionFailed(nil, "INSTANCE-28fHe", "Errors.Instance.LabelPolicy.NotChanged")
|
||||
}
|
||||
|
||||
pushedEvents, err := c.eventstore.Push(ctx, changedEvent)
|
||||
@@ -75,7 +75,7 @@ func (c *Commands) AddLogoDefaultLabelPolicy(ctx context.Context, upload *AssetU
|
||||
}
|
||||
|
||||
if existingPolicy.State == domain.PolicyStateUnspecified || existingPolicy.State == domain.PolicyStateRemoved {
|
||||
return nil, zerrors.ThrowNotFound(nil, "INSTANCE-Qw0pd", "Errors.IAM.LabelPolicy.NotFound")
|
||||
return nil, zerrors.ThrowNotFound(nil, "INSTANCE-Qw0pd", "Errors.Instance.LabelPolicy.NotFound")
|
||||
}
|
||||
asset, err := c.uploadAsset(ctx, upload)
|
||||
if err != nil {
|
||||
@@ -100,7 +100,7 @@ func (c *Commands) RemoveLogoDefaultLabelPolicy(ctx context.Context) (*domain.Ob
|
||||
}
|
||||
|
||||
if existingPolicy.State == domain.PolicyStateUnspecified || existingPolicy.State == domain.PolicyStateRemoved {
|
||||
return nil, zerrors.ThrowNotFound(nil, "INSTANCE-Xc8Kf", "Errors.IAM.LabelPolicy.NotFound")
|
||||
return nil, zerrors.ThrowNotFound(nil, "INSTANCE-Xc8Kf", "Errors.Instance.LabelPolicy.NotFound")
|
||||
}
|
||||
|
||||
err = c.removeAsset(ctx, authz.GetInstance(ctx).InstanceID(), existingPolicy.LogoKey)
|
||||
@@ -126,7 +126,7 @@ func (c *Commands) AddIconDefaultLabelPolicy(ctx context.Context, upload *AssetU
|
||||
}
|
||||
|
||||
if existingPolicy.State == domain.PolicyStateUnspecified || existingPolicy.State == domain.PolicyStateRemoved {
|
||||
return nil, zerrors.ThrowNotFound(nil, "INSTANCE-1yMx0", "Errors.IAM.LabelPolicy.NotFound")
|
||||
return nil, zerrors.ThrowNotFound(nil, "INSTANCE-1yMx0", "Errors.Instance.LabelPolicy.NotFound")
|
||||
}
|
||||
asset, err := c.uploadAsset(ctx, upload)
|
||||
if err != nil {
|
||||
@@ -151,7 +151,7 @@ func (c *Commands) RemoveIconDefaultLabelPolicy(ctx context.Context) (*domain.Ob
|
||||
}
|
||||
|
||||
if existingPolicy.State == domain.PolicyStateUnspecified || existingPolicy.State == domain.PolicyStateRemoved {
|
||||
return nil, zerrors.ThrowNotFound(nil, "INSTANCE-4M0qw", "Errors.IAM.LabelPolicy.NotFound")
|
||||
return nil, zerrors.ThrowNotFound(nil, "INSTANCE-4M0qw", "Errors.Instance.LabelPolicy.NotFound")
|
||||
}
|
||||
err = c.removeAsset(ctx, authz.GetInstance(ctx).InstanceID(), existingPolicy.IconKey)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user