Saving or updating ParseUser in cloud code

I am getting an error because " custom objects cannot allow writes from other users " when I try to signUp or update ParseUser in cloudy code. As pointed out by the Parse team, I am using Parse.Cloud.useMasterKey () to get around the limitations. Where could I be wrong? I am confused as this code previously worked. Thanks in advance.

+3


source to share


1 answer


If possible, can you provide some codes related to your problem? For example, below code successfully updates the analysis username column (tested in Parse cloud);

   Parse.Cloud.define("test", function(request, response) {
   Parse.Cloud.useMasterKey();
   var query = new Parse.Query(Parse.User);
   query.equalTo("objectId", request.params.objectId);
   query.first({
      success: function(object) {
         object.set("name", request.params.name);
         object.save();
         response.success("Success Message");
      },
      error: function(error) {
         response.error("Error Message");
      }
   });
});

      



However, if one of the ParseUser tries to update another, the problem might be with the ACL. If you provide codes, this is really helpful. Hope this helps,

Sincerely.

+2


source







All Articles