feat: Private label email policy (#813)

* Label Policy added

* save

* chore: update docs action

* Save

* Save

* Get colors from DB

* Variables inserted

* Get images from global directory.

* Add tests

* Add tests

* Corrections from mergerequest

* Corrections from mergerequest

* Test corrected.

* Added colors to all notifications.

* Added colors to
Corrected text and formatting.all notifications.

* Spelling error corrected.

* fix: tests

* Merge Branch corrected.

* Step6 added

* Corrections from mergerequest

* fix: generate management

* Formatted texts.

* fix: migrations

Co-authored-by: Florian Forster <florian@caos.ch>
Co-authored-by: adlerhurst <silvan.reusser@gmail.com>
Co-authored-by: Fabiennne <fabienne.gerschwiler@gmail.com>
This commit is contained in:
Michael Waeger
2020-10-20 19:10:23 +02:00
committed by GitHub
parent cfd119924f
commit 42384763d1
65 changed files with 7143 additions and 13940 deletions

View File

@@ -12,6 +12,7 @@ const (
Step3
Step4
Step5
Step6
//StepCount marks the the length of possible steps (StepCount-1 == last possible step)
StepCount
)
@@ -25,6 +26,7 @@ type IAM struct {
Members []*IAMMember
IDPs []*IDPConfig
DefaultLoginPolicy *LoginPolicy
DefaultLabelPolicy *LabelPolicy
DefaultOrgIAMPolicy *OrgIAMPolicy
DefaultPasswordComplexityPolicy *PasswordComplexityPolicy
DefaultPasswordAgePolicy *PasswordAgePolicy

View File

@@ -0,0 +1,18 @@
package model
import (
"github.com/caos/zitadel/internal/eventstore/models"
)
type LabelPolicy struct {
models.ObjectRoot
State PolicyState
Default bool
PrimaryColor string
SecondaryColor string
}
func (p *LabelPolicy) IsValid() bool {
return p.ObjectRoot.AggregateID != ""
}

View File

@@ -0,0 +1,48 @@
package model
import (
"time"
"github.com/caos/zitadel/internal/model"
)
type LabelPolicyView struct {
AggregateID string
PrimaryColor string
SecondaryColor string
Default bool
CreationDate time.Time
ChangeDate time.Time
Sequence uint64
}
type LabelPolicySearchRequest struct {
Offset uint64
Limit uint64
SortingColumn LabelPolicySearchKey
Asc bool
Queries []*LabelPolicySearchQuery
}
type LabelPolicySearchKey int32
const (
LabelPolicySearchKeyUnspecified LabelPolicySearchKey = iota
LabelPolicySearchKeyAggregateID
)
type LabelPolicySearchQuery struct {
Key LabelPolicySearchKey
Method model.SearchMethod
Value interface{}
}
type LabelPolicySearchResponse struct {
Offset uint64
Limit uint64
TotalResult uint64
Result []*LabelPolicyView
Sequence uint64
Timestamp time.Time
}