Retrieve ACL of ParseObject given objectId

余生长醉 提交于 2019-12-13 15:37:06

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!