问题
I'm doing a basic query. Due to the way my code is configured overall, it would be really convenient if I could just do a query on my Design class and then find out what the ACL of that design object is given its objectId. I am aware that the following code is incorrect, so perhaps treat it as pseudo code. Obviously, I can't retrieve the "ACL" from the "objectID" of the design. But is it possible to get the ACL from the Design class with a specific "objectID"?
public static boolean WhatIsDesignSecurityStatus(final String objectID) throws ParseException {
// get the design
ParseQuery<ParseObject> query = ParseQuery.getQuery("Design");
ParseObject design = query.get(objectID);
// check to see if the current design ACL is "Public Read" only. If so, return state.
if (design.get("ACL").equals("Public Read")) {
return true;
} else {
return false;
}
}
回答1:
Use getPublicReadAccess(); function....
Just check this link
Reference link
来源:https://stackoverflow.com/questions/33662486/retrieve-acl-of-parseobject-given-objectid