mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:17:32 +00:00
feat: validate org domains (#3387)
* feat: validate org domain command side * feat: validate org domain query side * fix: create domain policy * feat: add reading domain policy on addorg domain
This commit is contained in:
@@ -21,7 +21,8 @@ type DomainPolicyAddedEvent struct {
|
||||
func NewDomainPolicyAddedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
userLoginMustBeDomain bool,
|
||||
userLoginMustBeDomain,
|
||||
validateOrgDomain bool,
|
||||
) *DomainPolicyAddedEvent {
|
||||
return &DomainPolicyAddedEvent{
|
||||
DomainPolicyAddedEvent: *policy.NewDomainPolicyAddedEvent(
|
||||
@@ -30,6 +31,7 @@ func NewDomainPolicyAddedEvent(
|
||||
aggregate,
|
||||
DomainPolicyAddedEventType),
|
||||
userLoginMustBeDomain,
|
||||
validateOrgDomain,
|
||||
),
|
||||
}
|
||||
}
|
||||
@@ -50,7 +52,7 @@ type DomainPolicyChangedEvent struct {
|
||||
func NewDomainPolicyChangedEvent(
|
||||
ctx context.Context,
|
||||
aggregate *eventstore.Aggregate,
|
||||
changes []policy.OrgPolicyChanges,
|
||||
changes []policy.DomainPolicyChanges,
|
||||
) (*DomainPolicyChangedEvent, error) {
|
||||
changedEvent, err := policy.NewDomainPolicyChangedEvent(
|
||||
eventstore.NewBaseEventForPush(
|
||||
|
Reference in New Issue
Block a user