fix: (org) context handling (#1429)

* fix: add context queries

* typo

* handle org context corretly in mgmt api

* isDefault in policy converter

* handle org context correctly in auth api
This commit is contained in:
Livio Amstutz
2021-03-17 13:10:57 +01:00
committed by GitHub
parent 2bd255106a
commit 3cdaa8193d
16 changed files with 50 additions and 43 deletions

View File

@@ -50,11 +50,17 @@ func UpdateProjectGrantRequestToDomain(req *mgmt_pb.UpdateProjectGrantRequest) *
func ListProjectGrantMembersRequestToModel(req *mgmt_pb.ListProjectGrantMembersRequest) *proj_model.ProjectGrantMemberSearchRequest {
offset, limit, asc := object.ListQueryToModel(req.Query)
queries := member_grpc.MemberQueriesToProjectGrantMember(req.Queries)
queries = append(queries, &proj_model.ProjectGrantMemberSearchQuery{
Key: proj_model.ProjectGrantMemberSearchKeyProjectID,
Method: domain.SearchMethodEquals,
Value: req.ProjectId,
})
queries = append(queries,
&proj_model.ProjectGrantMemberSearchQuery{
Key: proj_model.ProjectGrantMemberSearchKeyProjectID,
Method: domain.SearchMethodEquals,
Value: req.ProjectId,
},
&proj_model.ProjectGrantMemberSearchQuery{
Key: proj_model.ProjectGrantMemberSearchKeyGrantID,
Method: domain.SearchMethodEquals,
Value: req.GrantId,
})
return &proj_model.ProjectGrantMemberSearchRequest{
Offset: offset,
Limit: limit,