开发者

Changing Document Visibility in Google Document List API

开发者 https://www.devze.com 2023-02-16 16:07 出处:网络
does someone knows how can I change a doc visibility using 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

精彩评论

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

关注公众号