Skip to content

Instantly share code, notes, and snippets.

@kjs3
Created June 16, 2015 03:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kjs3/047c1a2467a6d62bf223 to your computer and use it in GitHub Desktop.
Save kjs3/047c1a2467a6d62bf223 to your computer and use it in GitHub Desktop.
Trying to set Parse User ACL
var user = new Parse.User({
name: name,
username: email,
email: email,
password: password
});
user.signUp().then(
function() {
var user = Parse.User.current();
if ( user ) {
var customACL = new Parse.ACL(user);
customACL.setRoleWriteAccess(false);
customACL.setPublicWriteAccess(false)
user.setACL(customACL);
}
this.transitionTo('home');
}.bind(this),
function(error) {
// Show the error message somewhere and let the user try again.
alert("Error: " + error.code + " " + error.message);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment