0
votes

I want to show a pop up window asking user to abide by some rules and then grant him the rights for editing the sheet in google sheet using google script. If he clicks 'Agree' he is given rights and if clicks 'Not Agree' then he wont be able to edit that sheet. I can show a pop up with required options. But how can I add the user dynamically to editors list and when he closes the sheet he gets removed from that?

I tried protect sheets and add/remove users who click on the appropriate buttons. But this doesnt work. Users cannot add/remove themselves because they dont have rights. Can I run a script with script author rights who can add/edit editors?

1

1 Answers

0
votes

One way to do it would be to deploy your script as a web app (here's how you do it) instead of having it bound to your spreadsheet.

In doing so, you can have the script being executed as you, and should therefore be able to grant write access to your abiding users.