Skip to content

Commit

Permalink
Also resync on the gateway side
Browse files Browse the repository at this point in the history
Signed-off-by: michael sorens <[email protected]>
  • Loading branch information
msorens committed May 29, 2019
1 parent bf14537 commit fd94ac5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions components/automate-gateway/handler/authz.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,9 +351,8 @@ func (a *AuthzServer) getAllowedProjects(
pairsV2[i] = &authzV2.Pair{Resource: p.Resource, Action: p.Action}
}

resp, err := a.clientV2.FilterAuthorizedProjects(ctx, &authzV2.FilterAuthorizedPairsReq{
resp, err := a.clientV2.FilterAuthorizedProjects(ctx, &authzV2.FilterAuthorizedProjectsReq{
Subjects: subjects,
Pairs: pairsV2,
})
if err != nil {
log.WithError(err).Debug("Error on client.FilterAuthorizedProjects")
Expand Down
2 changes: 1 addition & 1 deletion components/automate-gateway/handler/authz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func TestIntrospectAllProjectsV2(t *testing.T) {
context.Background(), []string{"user:local:admin"}, []string{"project"}, "some:resource", "some:action:do", middleware.AuthV2.String())
req := &request.IntrospectAllProjectsReq{}
authzSrv.FilterAuthorizedProjectsFunc = func(
context.Context, *authz_v2.FilterAuthorizedPairsReq) (*authz_v2.FilterAuthorizedProjectsResp, error) {
context.Context, *authz_v2.FilterAuthorizedProjectsReq) (*authz_v2.FilterAuthorizedProjectsResp, error) {
return tc.authzResp, nil
}
resp, err := hdlr.IntrospectAllProjects(ctx, req)
Expand Down

0 comments on commit fd94ac5

Please sign in to comment.