mirror of
https://github.com/zitadel/zitadel.git
synced 2025-10-17 20:45:57 +00:00
feat: add project creator role on register user (#222)
* feat: add project creator role on register user * fix: better error message * fix: tests
This commit is contained in:
@@ -85,7 +85,10 @@ func (a *Aggregate) Validate() error {
|
||||
if a.resourceOwner == "" {
|
||||
return errors.ThrowPreconditionFailed(nil, "MODEL-eBYUW", "resource owner not set")
|
||||
}
|
||||
if a.Precondition != nil && (a.Precondition.Query == nil || a.Precondition.Query.Validate() != nil || a.Precondition.Validation == nil) {
|
||||
if a.Precondition != nil && (a.Precondition.Query == nil || a.Precondition.Validation == nil) {
|
||||
if err := a.Precondition.Query.Validate(); err != nil {
|
||||
return err
|
||||
}
|
||||
return errors.ThrowPreconditionFailed(nil, "MODEL-EEUvA", "invalid precondition")
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user