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:
Livio Amstutz
2021-04-19 16:43:36 +02:00
committed by GitHub
co-authored by fabi
parent 8da733315a
commit 6863aeac59
20 changed files with 692 additions and 70 deletions
+4
View File
@@ -23,6 +23,7 @@ type FeaturesWriteModel struct {
LoginPolicyUsernameLogin bool
PasswordComplexityPolicy bool
LabelPolicy bool
CustomDomain bool
}
func (wm *FeaturesWriteModel) Reduce() error {
@@ -66,6 +67,9 @@ func (wm *FeaturesWriteModel) Reduce() error {
if e.LabelPolicy != nil {
wm.LabelPolicy = *e.LabelPolicy
}
if e.CustomDomain != nil {
wm.CustomDomain = *e.CustomDomain
}
case *features.FeaturesRemovedEvent:
wm.State = domain.FeaturesStateRemoved
}