mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-03 05:42:22 +00:00
fix: add user metadata to the features (#2179)
* fix: add user metadata to the features * fix: remove user metadata * fix: add test * fix: add test
This commit is contained in:
@@ -30,6 +30,7 @@ type FeaturesView struct {
|
||||
CustomDomain bool
|
||||
CustomText bool
|
||||
PrivacyPolicy bool
|
||||
MetadataUser bool
|
||||
}
|
||||
|
||||
func (f *FeaturesView) FeatureList() []string {
|
||||
@@ -70,6 +71,9 @@ func (f *FeaturesView) FeatureList() []string {
|
||||
if f.PrivacyPolicy {
|
||||
list = append(list, domain.FeaturePrivacyPolicy)
|
||||
}
|
||||
if f.MetadataUser {
|
||||
list = append(list, domain.FeatureMetadataUser)
|
||||
}
|
||||
return list
|
||||
}
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ type FeaturesView struct {
|
||||
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"`
|
||||
}
|
||||
|
||||
func FeaturesToModel(features *FeaturesView) *features_model.FeaturesView {
|
||||
@@ -70,6 +71,7 @@ func FeaturesToModel(features *FeaturesView) *features_model.FeaturesView {
|
||||
CustomDomain: features.CustomDomain,
|
||||
CustomText: features.CustomText,
|
||||
PrivacyPolicy: features.PrivacyPolicy,
|
||||
MetadataUser: features.MetadataUser,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user