mirror of
https://github.com/zitadel/zitadel.git
synced 2025-04-16 11:51:30 +00:00
fix: set custom domains feature on orgs (#1623)
This commit is contained in:
parent
32bfd25b28
commit
f5a8cb20a5
@ -33,6 +33,7 @@ func (c *Commands) SetOrgFeatures(ctx context.Context, resourceOwner string, fea
|
|||||||
features.LoginPolicyUsernameLogin,
|
features.LoginPolicyUsernameLogin,
|
||||||
features.PasswordComplexityPolicy,
|
features.PasswordComplexityPolicy,
|
||||||
features.LabelPolicy,
|
features.LabelPolicy,
|
||||||
|
features.CustomDomain,
|
||||||
)
|
)
|
||||||
if !hasChanged {
|
if !hasChanged {
|
||||||
return nil, caos_errs.ThrowPreconditionFailed(nil, "Features-GE4h2", "Errors.Features.NotChanged")
|
return nil, caos_errs.ThrowPreconditionFailed(nil, "Features-GE4h2", "Errors.Features.NotChanged")
|
||||||
|
@ -68,7 +68,8 @@ func (wm *OrgFeaturesWriteModel) NewSetEvent(
|
|||||||
loginPolicyRegistration,
|
loginPolicyRegistration,
|
||||||
loginPolicyUsernameLogin,
|
loginPolicyUsernameLogin,
|
||||||
passwordComplexityPolicy,
|
passwordComplexityPolicy,
|
||||||
labelPolicy bool,
|
labelPolicy,
|
||||||
|
customDomain bool,
|
||||||
) (*org.FeaturesSetEvent, bool) {
|
) (*org.FeaturesSetEvent, bool) {
|
||||||
|
|
||||||
changes := make([]features.FeaturesChanges, 0)
|
changes := make([]features.FeaturesChanges, 0)
|
||||||
@ -109,6 +110,9 @@ func (wm *OrgFeaturesWriteModel) NewSetEvent(
|
|||||||
if wm.LabelPolicy != labelPolicy {
|
if wm.LabelPolicy != labelPolicy {
|
||||||
changes = append(changes, features.ChangeLabelPolicy(labelPolicy))
|
changes = append(changes, features.ChangeLabelPolicy(labelPolicy))
|
||||||
}
|
}
|
||||||
|
if wm.CustomDomain != customDomain {
|
||||||
|
changes = append(changes, features.ChangeCustomDomain(customDomain))
|
||||||
|
}
|
||||||
|
|
||||||
if len(changes) == 0 {
|
if len(changes) == 0 {
|
||||||
return nil, false
|
return nil, false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user