Skip to content

Instantly share code, notes, and snippets.

@onesword0618
Created December 25, 2018 15:53
Show Gist options
  • Select an option

  • Save onesword0618/79148c87c7aaf7b3659a8d0fce6db3da to your computer and use it in GitHub Desktop.

Select an option

Save onesword0618/79148c87c7aaf7b3659a8d0fce6db3da to your computer and use it in GitHub Desktop.
Enum Permission
// Creates a folder that anyone on the Internet can read from and write to. (Domain
// administrators can prohibit this setting for users of a G Suite domain.)
// フォルダ名を指定して新しいフォルダを生成する
var folder = DriveApp.createFolder('Shared Folder');
// 第一引数には、ドライブの公開範囲、第二引数には、第一引数の範囲にどんな権限を与えるのか
folder.setSharing(DriveApp.Access.ANYONE, DriveApp.Permission.EDIT);
@onesword0618
Copy link
Copy Markdown
Author

セキュリティとしては、第一引数は慎重に設定する必要がありそう。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment