From 220a13392d9ed587402ba04b0308f0524a2f87a4 Mon Sep 17 00:00:00 2001 From: Francis Lessard Date: Fri, 12 Feb 2016 16:32:45 -0500 Subject: [PATCH] no message --- src/RestWrite.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/RestWrite.js b/src/RestWrite.js index 497ac5b1..8dab5344 100644 --- a/src/RestWrite.js +++ b/src/RestWrite.js @@ -27,7 +27,9 @@ function RestWrite(config, auth, className, query, data, originalData) { this.auth = auth; this.className = className; this.storage = {}; - this.runOptions = {}; + this.runOptions = { + acl:['*'] + }; if (!query && data.objectId) { throw new Parse.Error(Parse.Error.INVALID_KEY_NAME, 'objectId ' + @@ -97,9 +99,8 @@ RestWrite.prototype.getUserAndRoleACL = function() { return Promise.resolve(); } return this.auth.getUserRoles().then((roles) => { - roles.push('*'); roles.push(this.auth.user.id); - this.runOptions.acl = roles; + this.runOptions.acl = this.runOptions.acl.concat(roles); return Promise.resolve(); }); };