I have the following spreadsheet:
-Template (protected)
-Current working sheet
-older sheet (protected)
-even older sheet (protected)
This spreadsheet is shared with a few users, and they have write permission in the "current working sheet". Once it is considered completed, I created a button in the "current working sheet" to which I assigned a script. When ran as owner, the script:
- renames the "current working sheet" to "something older"
- protects the "something older" sheet
- duplicates the "template" sheet as a new "current working sheet"
It all works fine wen ran by owner, however when the button that triggers the script is pressed by one of the users whom I shared the document with, then step (2) fails, meaning the sheet can't be protected. I suspect this is a permissions issue but I am a complete newbie in google scripting, so I am asking for some help here. Is there any way to make sure that no matter who presses the button, the assigned script is ran as owner?
thank you