fix: user by id request org id (#2337)

This commit is contained in:
Fabi
2021-09-08 15:14:39 +02:00
committed by GitHub
parent 1ac1492fd3
commit 530f3e6a4a
5 changed files with 56 additions and 1 deletions

View File

@@ -20,7 +20,7 @@ import (
)
func (s *Server) GetUserByID(ctx context.Context, req *mgmt_pb.GetUserByIDRequest) (*mgmt_pb.GetUserByIDResponse, error) {
user, err := s.user.UserByID(ctx, req.Id)
user, err := s.user.UserByIDAndResourceOwner(ctx, req.Id, authz.GetCtxData(ctx).OrgID)
if err != nil {
return nil, err
}