- Google Apps Script for Beginners
- Serge Gabet
- 363字
- 2021-07-19 18:14:23
Who is doing what? Script authorizations
As presented in Google's documentation, on one side, we have the user at the keyboard and on the other side, the script's author who installed the trigger; that is one aspect of the question and the other is the type of trigger: simple or installable.
Simple triggers run as the user at the keyboard, whether they are anonymous or logged in as an authorized editor, and therefore, simple triggers can only perform actions that don't require specific authorization or to connect to any service that needs authentication.
Following the same logic and knowing that triggers respond to events without informing the user, that is, silently, any installable trigger created by the script author will always run as if the author was running it, that is, under the authority of the author who installed the trigger.
That logic is very simple and easy to understand, but it's important to remember that when setting up a script that uses triggers.
We have seen before that some scripts require authorization before they actually execute; this is the case when a script is able to modify something or perform some action under the user's authority. For example, if you use a script to send an e-mail from your account, you would expect the script to warn you before doing it, right?
So it does; every reference or call to a nonanonymous service in a script file is analyzed when we try to run any function in that script or try to save a trigger for that script (by navigating to Resources | Current project's trigger | Add a new one in the menu bar) and ask for explicit authorization before its execution.
If you are not the owner of the script and you try to execute such a function, you will also be asked for explicit authorization, receive an e-mail that confirms that you have granted this script access to your data, and get a link that you can use to revoke the authorization.
This might seem like a complex procedure, but it's really a major security and privacy aspect that Google took care of, to handle in a secure manner.
- Android開發(fā)精要
- C和C++安全編碼(原書第2版)
- 你不知道的JavaScript(中卷)
- 深入淺出PostgreSQL
- 深入淺出Serverless:技術(shù)原理與應(yīng)用實踐
- 軟件測試技術(shù)指南
- RabbitMQ Cookbook
- ExtJS高級程序設(shè)計
- HTML5與CSS3基礎(chǔ)教程(第8版)
- Java網(wǎng)絡(luò)編程核心技術(shù)詳解(視頻微課版)
- 劍指大數(shù)據(jù):企業(yè)級數(shù)據(jù)倉庫項目實戰(zhàn)(在線教育版)
- RESTful Java Web Services(Second Edition)
- RealSenseTM互動開發(fā)實戰(zhàn)
- Python預(yù)測分析與機(jī)器學(xué)習(xí)
- 高性能PHP 7