How can I add ACL permissions to users?. in Kinvey

153 views Asked by At

I have this. It does not work. in others collections work fine with save, but this collection (users) not have save.

 Kinvey.User.get('546264a54b9cb82c61003727').then(
 function(response) {

        $scope.user = response;

        var acl = new Kinvey.Acl($scope.user);

        acl.addWriter($scope.currentcontact.Contact.contact.user_id);   
    acl.addReader($scope.currentcontact.Contact.contact.user_id);   

var promise = Kinvey.User.update($scope.user, {
        success: function() {
                console.log("...done");
          }
});
0

There are 0 answers