http://googleappsscript.blogspot.com/2010/12/docslist-notifications-and-performance.html
// Get all VIEWERS of a File or Folder
Folder myFolder = DocsList.getFolder("myFolder");
File myFile = myFolder.getFiles()[0];
User[] fileViewers = myFile.getViewers();
myFile.addEditor("myfriend@mydomain.com");
myFile.addViewer("myOtherFriend@mydomain.com");
// Similarly you can make permission changes in bulk
myFolder.addEditors(fileViewers);
myFolder.addViewer(fileViewers);
Комментариев нет:
Отправить комментарий