mirror of
https://github.com/zitadel/zitadel.git
synced 2025-10-09 11:12:01 +00:00
fix: Custom text split features (#2225)
* fix: separate tier of custom text (message and login) * fix: add migration * fix: build problems * fix: tests * Update internal/api/grpc/admin/features.go Co-authored-by: Livio Amstutz <livio.a@gmail.com> * Update internal/api/grpc/admin/features.go Co-authored-by: Livio Amstutz <livio.a@gmail.com> * fix: rename sql file * fix: change sql files * fix: console * fix: console Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
@@ -28,9 +28,10 @@ type FeaturesView struct {
|
||||
LabelPolicyPrivateLabel bool
|
||||
LabelPolicyWatermark bool
|
||||
CustomDomain bool
|
||||
CustomText bool
|
||||
PrivacyPolicy bool
|
||||
MetadataUser bool
|
||||
CustomTextMessage bool
|
||||
CustomTextLogin bool
|
||||
}
|
||||
|
||||
func (f *FeaturesView) FeatureList() []string {
|
||||
@@ -65,15 +66,18 @@ func (f *FeaturesView) FeatureList() []string {
|
||||
if f.CustomDomain {
|
||||
list = append(list, domain.FeatureCustomDomain)
|
||||
}
|
||||
if f.CustomText {
|
||||
list = append(list, domain.FeatureCustomText)
|
||||
}
|
||||
if f.PrivacyPolicy {
|
||||
list = append(list, domain.FeaturePrivacyPolicy)
|
||||
}
|
||||
if f.MetadataUser {
|
||||
list = append(list, domain.FeatureMetadataUser)
|
||||
}
|
||||
if f.CustomTextMessage {
|
||||
list = append(list, domain.FeatureCustomTextMessage)
|
||||
}
|
||||
if f.CustomTextLogin {
|
||||
list = append(list, domain.FeatureCustomTextLogin)
|
||||
}
|
||||
return list
|
||||
}
|
||||
|
||||
|
@@ -42,9 +42,10 @@ type FeaturesView struct {
|
||||
LabelPolicyPrivateLabel bool `json:"labelPolicyPrivateLabel" gorm:"column:label_policy_private_label"`
|
||||
LabelPolicyWatermark bool `json:"labelPolicyWatermark" gorm:"column:label_policy_watermark"`
|
||||
CustomDomain bool `json:"customDomain" gorm:"column:custom_domain"`
|
||||
CustomText bool `json:"customText" gorm:"column:custom_text"`
|
||||
PrivacyPolicy bool `json:"privacyPolicy" gorm:"column:privacy_policy"`
|
||||
MetadataUser bool `json:"metadataUser" gorm:"column:metadata_user"`
|
||||
CustomTextMessage bool `json:"customTextMessage" gorm:"column:custom_text_message"`
|
||||
CustomTextLogin bool `json:"customTextLogin" gorm:"column:custom_text_login"`
|
||||
}
|
||||
|
||||
func FeaturesToModel(features *FeaturesView) *features_model.FeaturesView {
|
||||
@@ -69,9 +70,10 @@ func FeaturesToModel(features *FeaturesView) *features_model.FeaturesView {
|
||||
LabelPolicyPrivateLabel: features.LabelPolicyPrivateLabel,
|
||||
LabelPolicyWatermark: features.LabelPolicyWatermark,
|
||||
CustomDomain: features.CustomDomain,
|
||||
CustomText: features.CustomText,
|
||||
PrivacyPolicy: features.PrivacyPolicy,
|
||||
MetadataUser: features.MetadataUser,
|
||||
CustomTextMessage: features.CustomTextMessage,
|
||||
CustomTextLogin: features.CustomTextLogin,
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user