-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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(GraphQL): Apply auth rules on type having @dgraph directive #5702
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember you were saying that even the RBAC rules were not working. Can you add a test for that as well?
Reviewed 4 of 4 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @arijitAD and @MichaelJCompton)
graphql/e2e/auth/auth_test.go, line 169 at r1 (raw file):
Query: ` mutation { addStudent(input : [{email : "` + emails[0] + `"}, {email : "` + emails[1] + `"}]) {
Can you use GraphQL variables here instead of string concatenation? That is usually the correct way to do these things.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added RBAC test,
Reviewable status: 1 of 4 files reviewed, 1 unresolved discussion (waiting on @MichaelJCompton and @pawanrawal)
graphql/e2e/auth/auth_test.go, line 169 at r1 (raw file):
Previously, pawanrawal (Pawan Rawal) wrote…
Can you use GraphQL variables here instead of string concatenation? That is usually the correct way to do these things.
Done.
…rmodeinc#5702) Auth rules were not applied on type having @dgraph directive because they were stored in authRules map corresponding to Graphql type name and was fetched with Dgraph type name when rewriting the query.
Fixes GRAPHQL-525
Fixes #5700
Auth rules were not applied on type having @dgraph directive because they were stored in
authRules
map corresponding to Graphql type name and was fetched with Dgraph type name when rewriting the query.This change is