mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-17 10:55:12 +00:00
chore: management console naming inconsistency (#11390)
# Which Problems Are Solved The following terms have all been renamed to management console: - Customer Portal (when used to mean the console) - Console - Admin Console # How the Problems Are Solved - Search & Replace smartly - Use Copilot for translation files Changes done to: backend + frontend codebase, docs, translations and protobufs (descriptions only) # Additional Context - Partially Closes #11279
This commit is contained in:
@@ -25,7 +25,7 @@ type systemConfigChangesInstanceModel struct {
|
||||
Domains []string
|
||||
GeneratedDomain string
|
||||
ProjectID string
|
||||
ConsoleAppID string
|
||||
ManagementConsoleAppID string
|
||||
RedirectUris []string
|
||||
PostLogoutRedirectUris []string
|
||||
}
|
||||
@@ -74,16 +74,16 @@ func (wm *SystemConfigWriteModel) Reduce() error {
|
||||
}
|
||||
case *instance.ProjectSetEvent:
|
||||
wm.Instances[e.Aggregate().InstanceID].ProjectID = e.ProjectID
|
||||
case *instance.ConsoleSetEvent:
|
||||
wm.Instances[e.Aggregate().InstanceID].ConsoleAppID = e.AppID
|
||||
case *instance.ManagementConsoleSetEvent:
|
||||
wm.Instances[e.Aggregate().InstanceID].ManagementConsoleAppID = e.AppID
|
||||
case *project.OIDCConfigAddedEvent:
|
||||
if wm.Instances[e.Aggregate().InstanceID].ConsoleAppID != e.AppID {
|
||||
if wm.Instances[e.Aggregate().InstanceID].ManagementConsoleAppID != e.AppID {
|
||||
continue
|
||||
}
|
||||
wm.Instances[e.Aggregate().InstanceID].RedirectUris = e.RedirectUris
|
||||
wm.Instances[e.Aggregate().InstanceID].PostLogoutRedirectUris = e.PostLogoutRedirectUris
|
||||
case *project.OIDCConfigChangedEvent:
|
||||
if wm.Instances[e.Aggregate().InstanceID].ConsoleAppID != e.AppID {
|
||||
if wm.Instances[e.Aggregate().InstanceID].ManagementConsoleAppID != e.AppID {
|
||||
continue
|
||||
}
|
||||
if e.RedirectUris != nil {
|
||||
@@ -107,7 +107,7 @@ func (wm *SystemConfigWriteModel) Query() *eventstore.SearchQueryBuilder {
|
||||
instance.InstanceDomainAddedEventType,
|
||||
instance.InstanceDomainRemovedEventType,
|
||||
instance.ProjectSetEventType,
|
||||
instance.ConsoleSetEventType,
|
||||
instance.ManagementConsoleSetEventType,
|
||||
).
|
||||
Or().
|
||||
AggregateTypes(project.AggregateType).
|
||||
@@ -119,10 +119,10 @@ func (wm *SystemConfigWriteModel) Query() *eventstore.SearchQueryBuilder {
|
||||
}
|
||||
|
||||
type SystemConfigChangesValidation struct {
|
||||
ProjectID string
|
||||
ConsoleAppID string
|
||||
Validations []preparation.Validation
|
||||
InstanceID string
|
||||
ProjectID string
|
||||
ManagementConsoleAppID string
|
||||
Validations []preparation.Validation
|
||||
InstanceID string
|
||||
}
|
||||
|
||||
func (wm *SystemConfigWriteModel) NewChangedEvents(commands *Commands) map[string]*SystemConfigChangesValidation {
|
||||
@@ -131,9 +131,9 @@ func (wm *SystemConfigWriteModel) NewChangedEvents(commands *Commands) map[strin
|
||||
cmds := make(map[string]*SystemConfigChangesValidation)
|
||||
for i, inst := range wm.Instances {
|
||||
cmds[i] = &SystemConfigChangesValidation{
|
||||
InstanceID: i,
|
||||
ProjectID: inst.ProjectID,
|
||||
ConsoleAppID: inst.ConsoleAppID,
|
||||
InstanceID: i,
|
||||
ProjectID: inst.ProjectID,
|
||||
ManagementConsoleAppID: inst.ManagementConsoleAppID,
|
||||
}
|
||||
//check each instance separately for changes (using the generated domain) and check if there's an existing custom domain
|
||||
newCustomDomainExists, isInstanceOfCustomDomain = wm.changeConfig(cmds[i], inst, commands)
|
||||
@@ -143,7 +143,7 @@ func (wm *SystemConfigWriteModel) NewChangedEvents(commands *Commands) map[strin
|
||||
}
|
||||
//handle the custom domain at last
|
||||
if newCustomDomainExists {
|
||||
//if the domain itself already exists, then only check if the uris of the console app exist as well
|
||||
// if the domain itself already exists, then only check if the uris of the Management Console app exist as well
|
||||
wm.changeURIs(cmds[instanceOfCustomDomain], wm.Instances[instanceOfCustomDomain], commands, wm.newExternalDomain)
|
||||
return cmds
|
||||
}
|
||||
@@ -171,7 +171,7 @@ func (wm *SystemConfigWriteModel) changeConfig(validation *SystemConfigChangesVa
|
||||
}
|
||||
}
|
||||
if newGeneratedDomainExists {
|
||||
//if the domain itself already exists, then only check if the uris of the console app exist as well
|
||||
// if the domain itself already exists, then only check if the uris of the Management Console app exist as well
|
||||
wm.changeURIs(validation, inst, commands, newGeneratedDomain)
|
||||
return newCustomDomainExists, isInstanceOfCustomDomain
|
||||
}
|
||||
@@ -181,5 +181,5 @@ func (wm *SystemConfigWriteModel) changeConfig(validation *SystemConfigChangesVa
|
||||
}
|
||||
|
||||
func (wm *SystemConfigWriteModel) changeURIs(validation *SystemConfigChangesValidation, inst *systemConfigChangesInstanceModel, commands *Commands, domain string) {
|
||||
validation.Validations = append(validation.Validations, commands.prepareUpdateConsoleRedirectURIs(domain))
|
||||
validation.Validations = append(validation.Validations, commands.prepareUpdateManagementConsoleRedirectURIs(domain))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user