mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-09 15:45:12 +00:00
fix: check whether org exists before creating user (#11647)
# Which Problems Are Solved It was possible to create a user with an imaginary org. # How the Problems Are Solved Check whether org exists before creating the user. # Additional Changes # Additional Context - Closes #11532
This commit is contained in:
@@ -114,6 +114,10 @@ func (c *Commands) AddMachine(ctx context.Context, machine *Machine, state *doma
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
err = c.checkOrgExists(ctx, machine.ResourceOwner)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cmds, err := preparation.PrepareCommands(ctx, c.eventstore.Filter, AddMachineCommand(agg, machine))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user