Shaheryar Rajper
Shaheryar Rajper

Reputation: 69

Set file sharing access and permission to group

I have a user who is on a extended leave, I need to set sharing access and permission of the files in the users drive to a group till the user is back.

I used the Admin SDK to pull all the file id's of the user.

What can I use to change all file permission to give the group email edit access? I used DriveApp but got Access Denied, this could be due to DriveApp being limited to the logged in user.

Are there any other options to complete the above task?

Upvotes: 1

Views: 245

Answers (2)

Phuongkhuyen
Phuongkhuyen

Reputation: 11

I will help you with new method that your mail sent with attach link will display allow! I preactice win with this code app csript. Note: send mail use htmlbody.

 var url= filepdf.addViewer(emailto).getUrl();
 var bodyhtml = '<a href='+url+'>attachment on bellow;m</a>'
 var subject = [];
 var Emaito = [];       

    MailApp.sendEmail({
                        to: emailto,
                        subject: subject,
                        htmlBody: bodyhtml,
                      });

Upvotes: 1

MαπμQμαπkγVπ.0
MαπμQμαπkγVπ.0

Reputation: 6729

You can use the method Permissions: update.

You can assign the following "roles" to the users.

  • organizer
  • owner
  • writer
  • commenter
  • reader

Upvotes: 1

Related Questions