2

I want to limit the access for each created new item in the class Lista, but request.user is always set to null.

How can I get the request originator through Cloud Code?

Parse.Cloud.beforeSave("Lista", function (request, response) {
    var requestUser = request.user; 
    var newACL = new Parse.ACL(requestUser);

    newACL.setPublicReadAccess(false);
    request.object.setACL(newACL);
    response.success();
});

1 Answers1

0

what sdk are you using? i switched to 1.9.0 and this bug disappeared...

https://parse.com/downloads/android/Parse/1.9.0

Michael E
  • 656
  • 2
  • 7
  • 13
  • Sorry for the long time... I was actually sing the Parse Cloud Code, that is, the solution on the cloud to avoid local processing in the client. – Guilherme Silva Sep 17 '15 at 23:53