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:
Fabi
2021-08-18 12:58:57 +02:00
committed by GitHub
parent 0ab973b967
commit f4fa3ecef3
26 changed files with 339 additions and 60 deletions

View File

@@ -26,9 +26,10 @@ type FeaturesWriteModel struct {
LabelPolicyPrivateLabel bool
LabelPolicyWatermark bool
CustomDomain bool
CustomText bool
PrivacyPolicy bool
MetadataUser bool
CustomTextMessage bool
CustomTextLogin bool
}
func (wm *FeaturesWriteModel) Reduce() error {
@@ -84,12 +85,15 @@ func (wm *FeaturesWriteModel) Reduce() error {
if e.CustomDomain != nil {
wm.CustomDomain = *e.CustomDomain
}
if e.CustomText != nil {
wm.CustomText = *e.CustomText
}
if e.MetadataUser != nil {
wm.MetadataUser = *e.MetadataUser
}
if e.CustomTextMessage != nil {
wm.CustomTextMessage = *e.CustomTextMessage
}
if e.CustomTextLogin != nil {
wm.CustomTextLogin = *e.CustomTextLogin
}
case *features.FeaturesRemovedEvent:
wm.State = domain.FeaturesStateRemoved
}