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"));
}
精彩评论