Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
NamanJain8 committed May 5, 2021
1 parent 9e1fdb8 commit f9ebd4c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
12 changes: 8 additions & 4 deletions edgraph/access_ee.go
Original file line number Diff line number Diff line change
Expand Up @@ -965,8 +965,10 @@ func authorizeQuery(ctx context.Context, parsedReq *gql.Result, graphql bool) er
return nil, nil, nil
}
blocked := make(map[string]struct{})
for _, pred := range x.AllACLPredicates() {
blocked[pred] = struct{}{}
for _, pred := range preds {
if x.IsAclPredicate(pred) {
blocked[pred] = struct{}{}
}
}
return blocked, nil, nil
}
Expand Down Expand Up @@ -1059,8 +1061,10 @@ func authorizeSchemaQuery(ctx context.Context, er *query.ExecutionResult) error
return nil, nil
}
blocked := make(map[string]struct{})
for _, pred := range x.AllACLPredicates() {
blocked[pred] = struct{}{}
for _, pred := range preds {
if x.IsAclPredicate(pred) {
blocked[pred] = struct{}{}
}
}
return blocked, nil
}
Expand Down
12 changes: 6 additions & 6 deletions testutil/multi_tenancy.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,8 @@ func QueryData(t *testing.T, dg *dgo.Dgraph, query string) []byte {
}

func Export(t *testing.T, token *HttpToken, dest, accessKey, secretKey string) *GraphQLResponse {
exportRequest := `mutation export($dst: String!, $f: String!, $access: String!, $secret: String!){
export(input: {destination: $dst, format: $f, accessKey: $access, secretKey: $secret}) {
exportRequest := `mutation export($dst: String!, $f: String!, $acc: String!, $sec: String!){
export(input: {destination: $dst, format: $f, accessKey: $acc, secretKey: $sec}) {
response {
message
}
Expand All @@ -355,10 +355,10 @@ export(input: {destination: $dst, format: $f, accessKey: $access, secretKey: $se
params := GraphQLParams{
Query: exportRequest,
Variables: map[string]interface{}{
"dst": dest,
"f": "rdf",
"access": accessKey,
"secret": secretKey,
"dst": dest,
"f": "rdf",
"acc": accessKey,
"sec": secretKey,
},
}

Expand Down

0 comments on commit f9ebd4c

Please sign in to comment.