-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Switch ACL to Relay Global Id #6495
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6495 +/- ##
===========================================
- Coverage 93.92% 83.77% -10.16%
===========================================
Files 169 169
Lines 11808 11812 +4
===========================================
- Hits 11091 9895 -1196
- Misses 717 1917 +1200
Continue to review full report at Codecov.
|
@@ -553,7 +554,7 @@ const ACL = new GraphQLObjectType({ | |||
Object.keys(p).forEach(rule => { | |||
if (rule !== '*' && rule.indexOf('role:') !== 0) { | |||
users.push({ | |||
userId: rule, | |||
userId: toGlobalId('_User', rule), |
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.
Can we make to work with either Relay global id or Parse object id?
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.
Its the output type, we should return only the RelayId, otherwise it would be hard in a near further to get off objectId
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.
Sorry. My bad. You're right.
@@ -99,6 +99,10 @@ const transformers = { | |||
} | |||
if (value.users) { | |||
value.users.forEach(rule => { | |||
const globalIdObject = fromGlobalId(rule.userId); |
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.
Like here. I think here it is working with both ids.
No description provided.