Switch ACL to Relay Global Id (#6495)

This commit is contained in:
Antoine Cormouls
2020-03-23 09:35:42 +01:00
committed by GitHub
parent 1b8f057904
commit 312a4bc812
3 changed files with 22 additions and 4 deletions

View File

@@ -99,6 +99,10 @@ const transformers = {
}
if (value.users) {
value.users.forEach(rule => {
const globalIdObject = fromGlobalId(rule.userId);
if (globalIdObject.type === '_User') {
rule.userId = globalIdObject.id;
}
parseACL[rule.userId] = {
read: rule.read,
write: rule.write,