检索的parseObject的ACL给出OBJECTID [英] Retrieve ACL of ParseObject given objectId
问题描述
我在做一个基本的查询。由于我的code为整体配置方式,这将是非常方便的,如果我能只是做我的设计类的查询,然后找出设计对象的ACL被赋予什么样的OBJECTID。我知道下面的code是不正确的,所以也许把它当作伪code。很显然,我不能从设计的OBJECTID检索ACL。但是,它可能与特定的对象ID?
从设计类获得ACL 公共静态布尔WhatIsDesignSecurityStatus(最后弦乐OBJECTID)抛出ParseException的{ //获取设计
ParseQuery<&的parseObject GT;查询= ParseQuery.getQuery(设计);
的parseObject设计= query.get(OBJECTID); //检查,看看目前的设计ACL是公开阅读而已。如果是这样,则返回状态。
如果(design.get(ACL)。等于(公开阅读)){
返回true;
}其他{
返回false;
}}
使用getPublicReadAccess();功能....
只要看看这个链接
链接
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;
}
}
Use getPublicReadAccess(); function....
Just check this link
Reference link
这篇关于检索的parseObject的ACL给出OBJECTID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!