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

fix(persistent): make persistent query namespace aware #7570

Merged
merged 5 commits into from
Mar 16, 2021

Conversation

NamanJain8
Copy link
Contributor

@NamanJain8 NamanJain8 commented Mar 15, 2021

This PR makes Persistent query namespace-aware. Also, there was a bug in a persistent query where an unauthorized user can add persistent queries.


This change is Reviewable

@NamanJain8 NamanJain8 changed the title fix(persistant): make persistant query namespace aware fix(persistent): make persistent query namespace aware Mar 15, 2021
@all-seeing-code
Copy link
Contributor

This PR makes Persistent query namespace-aware. Also, there was a bug in a persistent query where an unauthorized user can add persistent queries.

This change is Reviewable

Can we add a test with and without relevant JWT token?

Copy link
Contributor

@jarifibrahim jarifibrahim left a comment

Choose a reason for hiding this comment

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

I am not familiar with this piece of code. @abhimanyusinghgaur can review this PR.

Copy link
Contributor

@abhimanyusinghgaur abhimanyusinghgaur left a comment

Choose a reason for hiding this comment

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

:lgtm:

Just some nitpicks.

Reviewed 3 of 3 files at r2.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @manishrjain, @NamanJain8, and @vvbalaji-dgraph)


systest/multi-tenancy/basic_test.go, line 408 at r2 (raw file):

require.Zerof(t, len(resp.Errors), resp.Errors.Error())

you can use common.RequireNoGQLErrors(t, resp) for the same. That prints a better stack trace for debugging, if errors happen.


systest/multi-tenancy/basic_test.go, line 412 at r2 (raw file):

require.Zerof(t, len(resp.Errors), resp.Errors.Error())

common.RequireNoGQLErrors(t, resp)

@NamanJain8 NamanJain8 merged commit f72b5a5 into release/v21.03 Mar 16, 2021
@NamanJain8 NamanJain8 deleted the naman/persistant-query branch March 16, 2021 16:31
aman-bansal pushed a commit that referenced this pull request Mar 25, 2021
Make persistent query namespace-aware. Also, there was a bug in a persistent query where an unauthorized user can add persistent queries.
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.

4 participants