-
Notifications
You must be signed in to change notification settings - Fork 0
Understanding Permissions in GAS‐ICS‐Sync
The GAS-ICS-Sync project requires specific permissions to function correctly. This document explains why these permissions are requested, what they are used for, and how they may be restricted manually.
This permission allows the script to manage and deploy itself, including setting up triggers and running automatically.
- Setting up triggers for automatic synchronization.
- Managing script properties.
This permission allows the script to create, edit and delete tasks in Google Tasks.
- Creating and removing tasks in Google Tasks.
- Reading task lists.
This permission enables the script to send emails on behalf of the user.
- Sending notification emails about new updates.
- Automating email summaries about changes done to your calendar.
This permission allows the script to access and manage all calendars and events the user can access using Google Calendar.
- Reading, updating, and deleting events from your Google Calendar.
- Creating new events in your Google Calendar.
- Reading and creating calendars.
This permission enables the script to make external HTTP requests.
- Fetching ICS files from external URLs.
- Checking for new releases on github.
Google Apps Script automatically detects the necessary OAuth scopes for the code to run based on the APIs and services used in the script. However, you can explicitly define or restrict these scopes if needed.
You can edit the OAuth scopes directly in the appsscript.json configuration file of your project. Available Scopes can be found in Google's developer resources linked above.
{
"timeZone": "GMT",
"dependencies": {
"enabledAdvancedServices": [
{
"userSymbol": "Tasks",
"serviceId": "tasks",
"version": "v1"
},
{
"userSymbol": "Calendar",
"serviceId": "calendar",
"version": "v3"
}
]
},
"oauthScopes": [
"https://www.googleapis.com/auth/script.scriptapp",
"https://www.googleapis.com/auth/tasks",
"https://www.googleapis.com/auth/script.send_mail",
"https://www.googleapis.com/auth/calendar",
"https://www.googleapis.com/auth/script.external_request"
],
"exceptionLogging": "STACKDRIVER",
"runtimeVersion": "V8"
}
When you run the script after modifying the scopes, Google will prompt you to review and approve the new set of permissions.
Restricting permissions may cause the script to not work properly. Full functionality requires the permissions as originally requested. Adjusting these permissions should be done with caution and an understanding of the potential limitations on the script's capabilities.