mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-21 04:18:46 +00:00
feat: custom domain feature (#1618)
* fix: custom domain * fix: custom domain * fix: custom domain * fix: custom domain feature in proto * fix: remove custom domains on feature downgrade * fix test * fix: custom domain feature in proto * ensure tests work Co-authored-by: fabi <[email protected]>
This commit is contained in:
@@ -25,6 +25,7 @@ type FeaturesView struct {
|
||||
LoginPolicyUsernameLogin bool
|
||||
PasswordComplexityPolicy bool
|
||||
LabelPolicy bool
|
||||
CustomDomain bool
|
||||
}
|
||||
|
||||
func (f *FeaturesView) FeatureList() []string {
|
||||
@@ -50,6 +51,9 @@ func (f *FeaturesView) FeatureList() []string {
|
||||
if f.LabelPolicy {
|
||||
list = append(list, domain.FeatureLabelPolicy)
|
||||
}
|
||||
if f.CustomDomain {
|
||||
list = append(list, domain.FeatureCustomDomain)
|
||||
}
|
||||
return list
|
||||
}
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ type FeaturesView struct {
|
||||
LoginPolicyUsernameLogin bool `json:"loginPolicyUsernameLogin" gorm:"column:login_policy_username_login"`
|
||||
PasswordComplexityPolicy bool `json:"passwordComplexityPolicy" gorm:"column:password_complexity_policy"`
|
||||
LabelPolicy bool `json:"labelPolicy" gorm:"column:label_policy"`
|
||||
CustomDomain bool `json:"customDomain" gorm:"column:custom_domain"`
|
||||
}
|
||||
|
||||
func FeaturesToModel(features *FeaturesView) *features_model.FeaturesView {
|
||||
@@ -59,6 +60,7 @@ func FeaturesToModel(features *FeaturesView) *features_model.FeaturesView {
|
||||
LoginPolicyUsernameLogin: features.LoginPolicyUsernameLogin,
|
||||
PasswordComplexityPolicy: features.PasswordComplexityPolicy,
|
||||
LabelPolicy: features.LabelPolicy,
|
||||
CustomDomain: features.CustomDomain,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user