fix: projectorgs (#193)

* fix: get my project orgs

* fix: get project orgs
This commit is contained in:
Fabi
2020-06-09 16:20:14 +02:00
committed by GitHub
parent 17f0eea4a1
commit 25b97b1bcc
5 changed files with 10 additions and 6 deletions

View File

@@ -42,7 +42,11 @@ func (repo *UserGrantRepo) SearchMyProjectOrgs(ctx context.Context, request *gra
if ctxData.ProjectID == "" {
return nil, caos_errs.ThrowPreconditionFailed(nil, "APP-7lqva", "Could not get ProjectID")
}
if ctxData.ProjectID == repo.AuthZRepo.IamProjectID {
err := repo.AuthZRepo.FillIamProjectID(ctx)
if err != nil {
return nil, err
}
if ctxData.ProjectID == repo.AuthZRepo.UserGrantRepo.IamProjectID {
isAdmin, err := repo.IsIamAdmin(ctx)
if err != nil {
return nil, err