mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 11:04:25 +00:00
6863aeac59
* 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 <fabienne.gerschwiler@gmail.com>
41 lines
911 B
Go
41 lines
911 B
Go
package domain
|
|
|
|
import (
|
|
"github.com/caos/zitadel/internal/eventstore/v1/models"
|
|
)
|
|
|
|
type Org struct {
|
|
models.ObjectRoot
|
|
|
|
State OrgState
|
|
Name string
|
|
|
|
PrimaryDomain string
|
|
Domains []*OrgDomain
|
|
Members []*Member
|
|
OrgIamPolicy *OrgIAMPolicy
|
|
LoginPolicy *LoginPolicy
|
|
LabelPolicy *LabelPolicy
|
|
PasswordComplexityPolicy *PasswordComplexityPolicy
|
|
PasswordAgePolicy *PasswordAgePolicy
|
|
PasswordLockoutPolicy *PasswordLockoutPolicy
|
|
IDPs []*IDPConfig
|
|
}
|
|
|
|
func (o *Org) IsValid() bool {
|
|
return o.Name != ""
|
|
}
|
|
|
|
func (o *Org) AddIAMDomain(iamDomain string) {
|
|
o.Domains = append(o.Domains, &OrgDomain{Domain: NewIAMDomainName(o.Name, iamDomain), Verified: true, Primary: true})
|
|
}
|
|
|
|
type OrgState int32
|
|
|
|
const (
|
|
OrgStateUnspecified OrgState = iota
|
|
OrgStateActive
|
|
OrgStateInactive
|
|
OrgStateRemoved
|
|
)
|