将Google Apps脚本支持的电子表格批量部署到受限用户 [英] Mass deploy Google Apps Script powered spreadsheet to limited users

查看:130
本文介绍了将Google Apps脚本支持的电子表格批量部署到受限用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有100多个用户,我们为他们创建了一个Google电子表格,并要求他们在电子表格中输入原始数据.

We've 100+ users, and we created a google spreadsheet for them one by one and ask them to input raw data in the spreadsheet.

当前的工作流程是我们有一个程序,可以将电子表格一个接一个地导出到CSV文件,然后将其导入到我们的后端系统.没关系.

The current workflow is we've a program to export the spreadsheets one by one into CSV file and import them to our backend system. That's ok.

现在,我们了解到Google Apps脚本可能是一个更好的解决方案,例如用户可以通过附加组件->获取附加组件"在电子表格中发现附加组件,因此我们可以创建多个功能并通过调用我们的API来完全自动化导入过程,例如验证,试运行,导入等.

Now, we've learned the Google Apps Script might be a better solution, e.g. user can discover the add-ons in the spreadsheet via "Add-ons -> Get Add-ons", so we can create multiple features and fully automate the import process by calling our APIs, e.g. validation, dryrun, import etc.

问题:

  • 我们将继续在apps脚本中更新功能,因此我们不想每次都更新所有这100多个图纸文档.
  • 我们不希望所有公共用户都可以安装加载项,只有我们的客户端(他们具有Google身份验证)

  • We will keep updating feature in the apps script, so we don't want to update all these 100+ sheets documents every time.
  • We don't want all public users can install in the add-ons, only our clients (they have Google auth)

如果我们可以保护用户免于查看/修改脚本,那就更好了

Would be better if we can protect user from viewing / modifying our script

有可能吗?

目前,我认为最好的方法是创建一个新的库项目并将大部分代码放入其中,并创建一个使用此库的容器绑定应用程序脚本.还有更好的方法吗?

Currently I think the best way is I can create a new library project and put most of the codes inside it, and create a container bounded apps script that use this library. Any better way?

推荐答案

附加用户无法看到其代码,发布新版本后,它将自动部署到所有已安装该版本的用户以及所有启用了加载项的文档.

Add-on users are not able to see its code, and once a new version is published it will automatically deployed to all users that have installed it and to all documents where the add-on is enabled.

我们可以通过选择未列出"或私人"来以某种方式限制插件的可见性,但是如果共享使用插件的文档,则文档编辑器可以安装该插件,因此为了强制谁有权使用附加功能,我们应该在某种程度上将对附加功能的访问权限列入白名单.

We can somehow limit the visibility of our add-ons by choosing "Unlisted" or "Private" but if a document that uses an add-on is shared, the document editors could install that add-on, so in order to enforce who has access to the add-on features we should include someway to whitelist access to add-on features.

我们可以对白名单进行硬编码,使用属性"服务或设置一种检查外部白名单的方法.

We could hardcode the whitelist, use the Properties service or set a way to check an external whitelist.

这篇关于将Google Apps脚本支持的电子表格批量部署到受限用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆