开发者

Changing Document Visibility in Google Document List API

does someone knows how can I change a doc visibility using Google Document List 开发者_开发知识库API?

I'd like to change from private to other visibility (all users in domain can see).


With the ACLs you can just add a domain, then it will be visible, for all the users in your domain.

In Java:

public static void insertDomainAcl(DocsService client, DocumentListEntry entry) throws MalformedURLException, IOException, ServiceException{
    client.insert(new URL(entry.getAclFeedLink().getHref()), new AclScope(AclScope.Type.DOMAIN, "domain.com"), new AclRole("reader"));
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜