mirror of
https://github.com/zitadel/zitadel
synced 2024-11-22 18:44:40 +00:00
fix(usergrant): verify project id is equal (#319)
* fix(usergrant): verify project id is equal * fix: delete wrong code
This commit is contained in:
parent
9c07711aab
commit
fcdf27c683
@ -214,7 +214,11 @@ func addUserGrantValidation(resourceOwner string, grant *model.UserGrant) func(.
|
||||
}
|
||||
}
|
||||
|
||||
//TODO: rethink this function i know it's ugly.
|
||||
func checkProjectConditions(resourceOwner string, grant *model.UserGrant, project *proj_es_model.Project) error {
|
||||
if grant.ProjectID != project.AggregateID {
|
||||
return errors.ThrowInvalidArgument(nil, "EVENT-ixlMx", "project doesn't exist")
|
||||
}
|
||||
if project.State == int32(proj_model.ProjectStateRemoved) {
|
||||
return errors.ThrowPreconditionFailed(nil, "EVENT-Lxp0s", "project doesn't exist")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user