Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disallow schema queries when an user has not logged in. #4107

Merged
merged 5 commits into from
Nov 5, 2019

Conversation

martinmr
Copy link
Contributor

@martinmr martinmr commented Sep 30, 2019

This change is Reviewable

@martinmr martinmr requested review from manishrjain and a team as code owners September 30, 2019 19:07
Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ A review job has been created and sent to the PullRequest network.


@martinmr you can click here to see the review status or cancel the code review job.

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 Message
It looks like the description for this pull request is either blank or very short. Adding a high-level summary will help our reviewers provide better feedback. Feel free to include questions for PullRequest reviewers and make specific feedback requests.

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation changes were easy to follow, thank you. No further comments and no significant defects identified.


Reviewed with ❤️ by PullRequest

@@ -678,6 +678,8 @@ func authorizeQuery(ctx context.Context, parsedReq *gql.Result) error {
var userId string
var groupIds []string
preds := parsePredsFromQuery(parsedReq.Query)
isSchemaQuery := parsedReq != nil && parsedReq.Schema != nil
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like you are already doing a parsedReq.Query above which should fail with a nil pointer dereference before this. So you may be able to either remove the parsedReq != nil check if it is guaranteed to not be nil or add a check earlier on and return an error possibly?

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Due to inactivity, PullRequest has cancelled this review job. You can reactivate the code review job from the PullRequest dashboard

@martinmr
Copy link
Contributor Author

@mangalaman93 @animesh2049 This design has been approved, can you take a look at this PR?

Copy link
Contributor

@manishrjain manishrjain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 4 of 8 files at r1, 4 of 4 files at r2.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @martinmr)

@martinmr martinmr merged commit c2306ae into master Nov 5, 2019
@martinmr martinmr deleted the martinmr/acl-schema-queries branch November 5, 2019 01:10
mangalaman93 added a commit to dgraph-io/dgo that referenced this pull request Nov 21, 2019
mangalaman93 added a commit to dgraph-io/dgo that referenced this pull request Nov 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants