问题
We are developing a program that uses Google spreadsheets as the input. The values of the spreadsheet is read, processed and a result is showed in a webpage.
When an user sign up we clone a spreadsheet from a template using a service account. The template has some scripts we want to use to help the user to introduce the values on the spreadsheet.
But the scripts seems to have as the owner the service account, and according to Google scripts belonging to service accounts can not be executed.
The error message is :
Google Apps Script: The script cannot be run because it is owned by a service account. Please copy or transfer the project to a valid account before running.
We transfer the ownership of the spreadsheet from the service account to a gmail user, and if that user creates an script it runs perfectly, but the scripts inherited from the template seems to still has as owner the service account and therefore can not been executed.
My question is ... how exactly can I transfer the ownership of a project (a script) from the service account to another user?
I've googled it and searched on the developer Google spreadsheet site but couldn't find an answer
来源:https://stackoverflow.com/questions/39881518/permissions-error-when-running-a-script-in-a-google-spreadsheet