检索给定 objectId 的 ParseObject 的 ACL
Retrieve ACL of ParseObject given objectId
我正在做一个基本查询。由于我的代码的整体配置方式,如果我可以对我的设计 class 进行查询,然后找出该设计对象的 ACL 被赋予其 objectId,那将非常方便。我知道下面的代码是不正确的,所以也许将其视为伪代码。显然,我无法从设计的 "objectID" 中检索到 "ACL"。但是是否可以从具有特定 "objectID" 的设计 class 中获取 ACL?
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;
}
}
我正在做一个基本查询。由于我的代码的整体配置方式,如果我可以对我的设计 class 进行查询,然后找出该设计对象的 ACL 被赋予其 objectId,那将非常方便。我知道下面的代码是不正确的,所以也许将其视为伪代码。显然,我无法从设计的 "objectID" 中检索到 "ACL"。但是是否可以从具有特定 "objectID" 的设计 class 中获取 ACL?
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;
}
}