问题
I'm searching for this like crazy and I just can't find a answer.
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.
回答1:
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.
来源:https://stackoverflow.com/questions/44370341/automatic-programmatically-enable-apps-scripts-addons-on-google-docs