New eventstore policies (#1084)

* feat: login policy

* feat: password complexity policy

* feat: org iam policy

* feat: label policy

* feat: add and change policies

* feat: second factors

* feat: second and multi factors

* feat: better naming

* feat: better naming
This commit is contained in:
Fabi
2020-12-11 15:49:19 +01:00
committed by GitHub
parent 31ea9d1acd
commit 5b433dcaa3
85 changed files with 3477 additions and 1648 deletions

View File

@@ -22,7 +22,7 @@ type LoginPolicy struct {
type IDPProvider struct {
models.ObjectRoot
Type IDPProviderType
IdpConfigID string
IDPConfigID string
}
type PolicyState int32
@@ -66,12 +66,12 @@ func (p *LoginPolicy) IsValid() bool {
}
func (p *IDPProvider) IsValid() bool {
return p.ObjectRoot.AggregateID != "" && p.IdpConfigID != ""
return p.ObjectRoot.AggregateID != "" && p.IDPConfigID != ""
}
func (p *LoginPolicy) GetIdpProvider(id string) (int, *IDPProvider) {
for i, m := range p.IDPProviders {
if m.IdpConfigID == id {
if m.IDPConfigID == id {
return i, m
}
}