Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • Object Security android

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 317
    Comment on it

    For an object, we can specify the access control of the object means which users are allowed to read the object and which users are allowed to write.

    To do this, each object has an access control list. Parse provide ParseACL class to handle all this.

    To create an object that only accessed by the current user, we specify it on setACL() method.

    Below is the example:

    ParseObject exampleObject = new ParseObject("Example");
    exampleObject.put("content", "This is an example!");
    exampleObject.setACL(new ParseACL(ParseUser.getCurrentUser()));

    If we need to create object that access by publicly, we create an object of ParseACL.

    Then pass the ParseACL object to setACL() method.

      ParseACL parseACL = new ParseACL();
                        ParseObject uploadVideo = new ParseObject("Example");
                        uploadVideo.put("user_id", ParseUser.getCurrentUser());
                        uploadVideo.put("thumbnail", parseThumb);


 0 Comment(s)

Sign In

Sign up using

Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: