fix: rename iam to instance (#3345)

* fix: rename iam command side to instance

* fix: rename iam command side to instance

* fix: rename iam command side to instance

* fix: rename iam command side to instance

* fix: rename orgiampolicy to domain policy

* fix: merge conflicts

* fix: protos

* fix: md files

* implement deprecated org iam policy again

Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
Fabi
2022-03-24 17:21:34 +01:00
committed by GitHub
parent 504fe5b761
commit 9d4f296c62
274 changed files with 12073 additions and 11853 deletions

View File

@@ -58,9 +58,9 @@ func (u *Human) IsValid() bool {
return u.Username != "" && u.Profile != nil && u.Profile.IsValid() && u.Email != nil && u.Email.IsValid() && u.Phone == nil || (u.Phone != nil && u.Phone.PhoneNumber != "" && u.Phone.IsValid())
}
func (u *Human) CheckOrgIAMPolicy(policy *OrgIAMPolicy) error {
func (u *Human) CheckDomainPolicy(policy *DomainPolicy) error {
if policy == nil {
return caos_errors.ThrowPreconditionFailed(nil, "DOMAIN-zSH7j", "Errors.Users.OrgIamPolicyNil")
return caos_errors.ThrowPreconditionFailed(nil, "DOMAIN-zSH7j", "Errors.Users.DomainPolicyNil")
}
if !policy.UserLoginMustBeDomain && u.Profile != nil && u.Username == "" && u.Email != nil {
u.Username = u.EmailAddress

View File

@@ -8,7 +8,7 @@ const (
IAMID = "IAM"
)
type IAM struct {
type Instance struct {
models.ObjectRoot
GlobalOrgID string
@@ -19,7 +19,7 @@ type IAM struct {
IDPs []*IDPConfig
DefaultLoginPolicy *LoginPolicy
DefaultLabelPolicy *LabelPolicy
DefaultOrgIAMPolicy *OrgIAMPolicy
DefaultDomainPolicy *DomainPolicy
DefaultPasswordComplexityPolicy *PasswordComplexityPolicy
DefaultPasswordAgePolicy *PasswordAgePolicy
DefaultPasswordLockoutPolicy *LockoutPolicy

View File

@@ -10,16 +10,8 @@ type Org struct {
State OrgState
Name string
PrimaryDomain string
Domains []*OrgDomain
Members []*Member
OrgIamPolicy *OrgIAMPolicy
LoginPolicy *LoginPolicy
LabelPolicy *LabelPolicy
PasswordComplexityPolicy *PasswordComplexityPolicy
PasswordAgePolicy *PasswordAgePolicy
PasswordLockoutPolicy *LockoutPolicy
IDPs []*IDPConfig
PrimaryDomain string
Domains []*OrgDomain
}
func (o *Org) IsValid() bool {

View File

@@ -4,7 +4,7 @@ import (
"github.com/caos/zitadel/internal/eventstore/v1/models"
)
type OrgIAMPolicy struct {
type DomainPolicy struct {
models.ObjectRoot
UserLoginMustBeDomain bool