Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

Grant permissions on a shared google drive with script

$
0
0

I have google drive folder with subfolders, each subfolder has several google sheets and each sheet has a set of functions that run when users click on buttons, the issue is that for every time user try to run a function, google requests permission to run the script, I want to know if I can grant all our users to use the script on all files with out google prompting them each time they use a function

Here is the code that I tried and it ran without errors but it didn't accomplish anything:

function insertPermission() {  var resource = {    // enter email address here    value: 'xxxxxxxxx@xxxxxxx.com',     // choose from "user" or "group" if using a Google Group    type: 'user',                    // choose from: "owner", "writer" or "reader"    role: 'writer'  };  var optionalArgs = {    sendNotificationEmails: false,    supportsAllDrives: true,  };  Drive.  Drive.Permissions.insert(resource, 'FolderIDGoesHere', optionalArgs);}

Any suggestions how to perform that action will be much appreciatedThanks


Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>