Skip to content

Instantly share code, notes, and snippets.

@nowri
Last active August 29, 2015 14:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nowri/e9279d3bc469d08187ff to your computer and use it in GitHub Desktop.
Save nowri/e9279d3bc469d08187ff to your computer and use it in GitHub Desktop.
GASで非共有Driveファイルのオーナー権限を変更する ref: http://qiita.com/nowri/items/2d33f9ba580da52c913c
var file = DriveApp.getFileById("FILE_ID_HERE");//自分がオーナーのファイル
var targetMail = "new@example.org";
var oldMail;
file.setOwner(targetMail);
oldMail = Session.getActiveUser().getEmail();
file.removeEditor(oldMail);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment