Hi google spreadsheet scripters,
script publisher has spreadsheet in publisher's drive. The script does openByURL.
Problem: Google makes user grant authorization for script to update all spreadsheets in user's drive.
That's not where the script is! Why would user want to give publisher access to all spreadsheets in user's drive?
My requirements are: user and script publisher are strangers. Script user refuses to expose user's Drive to script publisher.
Publisher wants to keep proprietary logic unexposed, in hidden script functions (scriptnames_)
// Script-as-app template.
function doGet() {
var app = UiApp.createApplication();
url = "https://docs.google.com/spreadsheet/ccc?key=xxx_X'd_out_xxxxxxxxxxx&usp=sharing";
var doc = SpreadsheetApp.openByUrl(url);
var spreadsheet_link = app.createAnchor('<br><br> spreadsheet open ', doc.getUrl()).setId("<br> <br>spreadsheet link");
app.add(spreadsheet_link);
return app;
}
(Yes, I know I could have publisher email a spreadsheet to the user, but I'd still be stuck with the user needing to grant authorizations to publisher's script, which would still cause Google to request authorization for script to modify all spreadsheets on user's drive.)
Apologies if this is rehash of old discussion. I searched and don't see it worded like this. Thanks!