perf: user grant owner removed (#6962)

* fix: change logic for usergrants projection with no selects

* fix: change logic for usergrants projection with one select

* fix: move resource owner select to single function

* fix: move resource owner select to single function

* fix: changes after merge

* fix: changes after merge

---------

Co-authored-by: Tim Möhlmann <tim+github@zitadel.com>
This commit is contained in:
Stefan Benz
2024-01-08 16:26:30 +01:00
committed by GitHub
parent e9cb1b90aa
commit e769b163ef
22 changed files with 488 additions and 210 deletions

View File

@@ -19,7 +19,7 @@ func (s *Server) GetUserGrantByID(ctx context.Context, req *mgmt_pb.GetUserGrant
if err != nil {
return nil, err
}
grant, err := s.query.UserGrant(ctx, true, false, idQuery, ownerQuery)
grant, err := s.query.UserGrant(ctx, true, idQuery, ownerQuery)
if err != nil {
return nil, err
}
@@ -33,7 +33,7 @@ func (s *Server) ListUserGrants(ctx context.Context, req *mgmt_pb.ListUserGrantR
if err != nil {
return nil, err
}
res, err := s.query.UserGrants(ctx, queries, false, false)
res, err := s.query.UserGrants(ctx, queries, false)
if err != nil {
return nil, err
}