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