Parse Cloud Code request.user returns null on class beforeSave()

380 Views Asked by At

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

There are 1 best solutions below

1
On

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

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