Created
August 2, 2013 17:44
-
-
Save niraj-shah/6141831 to your computer and use it in GitHub Desktop.
Two examples of setting ACL controls using Parse JS SDK
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ACL to restrict write to user, and public read access | |
var custom_acl = new Parse.ACL(); | |
// give write access to the current user | |
custom_acl.setWriteAccess( Parse.User.current(), true); | |
// give public read access | |
custom_acl.setPublicReadAccess(true); | |
GameObject.setACL(custom_acl); | |
// ACL to restrict write to user, and no public access | |
var custom_acl = new Parse.ACL(); | |
// give write access to the current user | |
custom_acl.setWriteAccess( Parse.User.current(), true); | |
// disable public read access | |
custom_acl.setPublicReadAccess(false); | |
GameObject.setACL(custom_acl); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment