fix: move activity log to queries and remove old code (#3096)

* move changes to queries and remove old code

* fix changes query

* remove unused code

* fix sorting

* fix sorting

* refactor and remove old code

* remove accidental go.mod replace

* add missing file

* remove listDetail from ChangesResponse
This commit is contained in:
Livio Amstutz
2022-01-26 10:16:33 +01:00
committed by GitHub
parent 52da2354a3
commit e99b7f4972
100 changed files with 579 additions and 3565 deletions

View File

@@ -11,11 +11,15 @@ import (
)
func (s *Server) GetUserGrantByID(ctx context.Context, req *mgmt_pb.GetUserGrantByIDRequest) (*mgmt_pb.GetUserGrantByIDResponse, error) {
idQuery, err := query.NewUserGrantGrantIDSearchQuery(req.GrantId)
if err != nil {
return nil, err
}
ownerQuery, err := query.NewUserGrantResourceOwnerSearchQuery(authz.GetCtxData(ctx).OrgID)
if err != nil {
return nil, err
}
grant, err := s.query.UserGrantByID(ctx, req.GrantId, ownerQuery)
grant, err := s.query.UserGrant(ctx, idQuery, ownerQuery)
if err != nil {
return nil, err
}