自动/以编程方式在Google文档上启用Apps脚本插件 [英] Automatic/Programmatically enable Apps Scripts Addon's on Google Docs

查看:110
本文介绍了自动/以编程方式在Google文档上启用Apps脚本插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找这个疯狂的东西,我找不到答案。

I'm searching for this like crazy and I just can't find a answer.

试想一下。我有一个主帐户。使用文档API我将授予用户访问某些文档的权限。但是我需要在每个文件中启用我的插件。有权访问文档的用户不在我的组织G Suite或其他任何位置。他们是随机的Gmail用户。

Imagine this. I have a "master" account. Using the Docs API I will grant access to users to some documents. But I need my addon enabled in every file. The users that will have access to the documents are not under my organization G Suite or anything. They are random gmail users.

有什么办法可以做到吗? (除了手动执行)我无法在文档中找到它。

Is there any way to do it? (besides of doing it manually) I couldn't find it in the documentation.

推荐答案

无法禁用加载项,开始,但另一种解决方案是在你的加载项中创建一个服务模型。维护已安装加载项的用户数据库,使用此功能可以开发允许用户使用加载项的逻辑。

It's not possible to disable an add-on, but an alternate solution is to create a service model inside your add-on. Maintain a DB of users that have installed your add-on, using this you can develop a logic which user is allowed to use an add-on.

这是迄今为止我能想到的最佳解决方案。

This is by far the best solution I can think of.

这篇关于自动/以编程方式在Google文档上启用Apps脚本插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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