Fix : save whit masterKey cause object not found.

This commit is contained in:
Francis Lessard
2016-02-18 13:29:26 -05:00
parent 67c7670437
commit 5de33ac226

View File

@@ -27,9 +27,7 @@ function RestWrite(config, auth, className, query, data, originalData) {
this.auth = auth;
this.className = className;
this.storage = {};
this.runOptions = {
acl:[]
};
this.runOptions = {};
if (!query && data.objectId) {
throw new Parse.Error(Parse.Error.INVALID_KEY_NAME, 'objectId ' +
@@ -99,7 +97,7 @@ RestWrite.prototype.getUserAndRoleACL = function() {
return Promise.resolve();
}
this.runOptions.acl.push("*");
this.runOptions.acl = ['*'];
if( this.auth.user ){
return this.auth.getUserRoles().then((roles) => {