diff --git a/docs/Authorization.md b/docs/Authorization.md index c294e9b7..7228d014 100644 --- a/docs/Authorization.md +++ b/docs/Authorization.md @@ -7,6 +7,7 @@ - [Definitions](#definitions) - [Manage Projects](#manage-projects) - [Authorize a super admin to create projects](#authorize-a-super-admin-to-create-projects) + - [Authorize Service Account Key Uploads](#authorize-service-account-key-uploads) - [Authorize GAM to create projects](#authorize-gam-to-create-projects) - [Create a new GCP project folder](#create-a-new-gcp-project-folder) - [Create a new project for GAM authorization](#create-a-new-project-for-gam-authorization) @@ -116,6 +117,7 @@ Verify whether the super admin you'll be using is in an OU where reauthenticatio Additional steps may be required if errors are encountered. * [Authorize a super admin to create projects](#authorize-a-super-admin-to-create-projects) +* [Authorize Service Account Key Uploads](#authorize-service-account-key-uploads) * [Authorize GAM to create projects](#authorize-gam-to-create-projects) ## Headless computers and Cloud Shells @@ -205,6 +207,46 @@ perform these steps and then retry the create project command. * Click Project Creator * Click Save +## Authorize Service Account Key Uploads + +If you try to create a project and get an error saying that Constraint `constraints/iam.disableServiceAccountKeyUpload violated for service account projects/gam-project-xxx` +perform these steps and then retry the create project command. + +* Login as an existing super admin at console.cloud.google.com +* In the upper left click the three lines to the left of Google Cloud and select IAM & Admin +* Under IAM & Admin select IAM +* Click the down arrow in the box to the right of Google Cloud +* Click the three dots at the right and select IAM/Permissions +* Now you should be at "Permissions for organization ..." +* Click on Grant Access +* Enter the new admin address in Principals +* Click in the Select a role box +* Type orgpolicy.policies.update in the Filter box +* Click Organization Policy Administrator +* Click Save +* In the upper left click the three lines to the left of Google Cloud and select IAM & Admin +* Under IAM & Admin select IAM +* Click the down arrow in the box to the right of Google Cloud +* Click the three dots at the right and select Manage Resources +* Click the three dots and the end of the line for the GAM project just created +* Click Settings +* Click Organization Policies in the left column +* Now you should be at "Policies for Gam Project" +* Click in the Filter box +* Enter iam.disableServiceAccountKeyUpload +* Click the three dots at the end of the Disable Service Account Key Upload +* Choose Edit policy +* Click Override parent's policy +* Click Add A Rule +* Select Enforcement/Off +* Click Done +* Click Set Policy + +Do the following to upload the service account key: +``` +gam update sakey +``` + ## Authorize GAM to create projects If you try to create a project and get an error saying "This app has been blocked on your domain for either being insecure or non-edutational"; you'll have to mark the GAM Project Creation app as trusted. diff --git a/docs/GamUpdates.md b/docs/GamUpdates.md index 237739d4..e025b312 100644 --- a/docs/GamUpdates.md +++ b/docs/GamUpdates.md @@ -10,6 +10,11 @@ Add the `-s` option to the end of the above commands to suppress creating the `g See [Downloads](https://github.com/taers232c/GAMADV-XTD3/wiki/Downloads) for Windows or other options, including manual installation +### 6.75.15 + +Updated all commands that display tasks to display the due date in GMT as the time portion +is not supported by the API and converting the due date to local time may display the wrong date. + ### 6.72.14 Upgraded to Python 3.12.3 where possible. diff --git a/docs/How-to-Upgrade-from-Standard-GAM.md b/docs/How-to-Upgrade-from-Standard-GAM.md index 12904be0..b60aaff8 100644 --- a/docs/How-to-Upgrade-from-Standard-GAM.md +++ b/docs/How-to-Upgrade-from-Standard-GAM.md @@ -334,7 +334,7 @@ writes the credentials into the file oauth2.txt. admin@server:/Users/admin/bin/gamadv-xtd3$ rm -f /Users/admin/GAMConfig/oauth2.txt admin@server:/Users/admin/bin/gamadv-xtd3$ ./gam version WARNING: Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: /Users/admin/GAMConfig/oauth2.txt, Not Found -GAMADV-XTD3 6.72.14 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.72.15 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.12.3 64-bit final MacOS Sonoma 14.4.1 x86_64 @@ -1006,7 +1006,7 @@ writes the credentials into the file oauth2.txt. C:\GAMADV-XTD3>del C:\GAMConfig\oauth2.txt C:\GAMADV-XTD3>gam version WARNING: Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\GAMConfig\oauth2.txt, Not Found -GAMADV-XTD3 6.72.14 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.72.15 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.12.3 64-bit final Windows-10-10.0.17134 AMD64 diff --git a/docs/Users-Tasks.md b/docs/Users-Tasks.md index ce7cddf2..63e763a2 100644 --- a/docs/Users-Tasks.md +++ b/docs/Users-Tasks.md @@ -69,6 +69,8 @@ gam create task * [parent ] [previous ] [compact|formatjson|returnidonly] ``` +The API only supports all-day tasks; you should specify: `due YYYY-MM-DDT00:00:00Z`. + By default, Gam displays the created task as an indented list of keys and values; the task notes text is displayed as individual lines. * `compact` - Display the task notes text with escaped carriage returns as \r and newlines as \n * `formatjson` - Display the task in JSON format @@ -100,6 +102,9 @@ By default, Gam displays the moved task as an indented list of keys and values; * `formatjson` - Display the task in JSON format ## Display Tasks +All commands that display tasks display the due date in GMT as the time portion +is not supported by the API and converting the due date to local time may display the wrong date. + ### Display selected tasks ``` gam info task @@ -119,6 +124,13 @@ gam show tasks [tasklists ] [orderby completed|due|updated] [countsonly|compact|formatjson] ``` +The API only supports dates in `duemin` and `duemax' but you must supply a null time: +* `duemin YYYY-MM-DDT00:00:00Z` - Specify the starting due date +* `duemax YYYY-MM-DDT00:00:00Z` - Specify one day beyond the ending due date + +For example: `duemin 2024-05-01T00:00:00Z duemax 2024-05-02T00:00:00Z` will +display all tasks on 2024-05-01. + By default, tasks are displayed in hierarchical order. * `orderby completed` - Display tasks in completed date order regardless of the hierarchy. * `orderby due` - Display tasks in due date order regardless of the hierarchy. @@ -142,6 +154,13 @@ gam print tasks [tasklists ] [todrive ])] ``` +The API only supports dates in `duemin` and `duemax' but you must supply a null time: +* `duemin YYYY-MM-DDT00:00:00Z` - Specify the starting due date +* `duemax YYYY-MM-DDT00:00:00Z` - Specify one day beyond the ending due date + +For example: `duemin 2024-05-01T00:00:00Z duemax 2024-05-02T00:00:00Z` will +display all tasks on 2024-05-01. + By default, tasks are displayed in hierarchical order. * `orderby completed` - Display tasks in completed date order regardless of the hierarchy. * `orderby due` - Display tasks in due date order regardless of the hierarchy. diff --git a/docs/Version-and-Help.md b/docs/Version-and-Help.md index 52d25cc9..b4e46800 100644 --- a/docs/Version-and-Help.md +++ b/docs/Version-and-Help.md @@ -3,7 +3,7 @@ Print the current version of Gam with details ``` gam version -GAMADV-XTD3 6.72.14 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.72.15 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.12.3 64-bit final MacOS Sonoma 14.4.1 x86_64 @@ -15,7 +15,7 @@ Time: 2023-06-02T21:10:00-07:00 Print the current version of Gam with details and time offset information ``` gam version timeoffset -GAMADV-XTD3 6.72.14 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.72.15 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.12.3 64-bit final MacOS Sonoma 14.4.1 x86_64 @@ -27,7 +27,7 @@ Your system time differs from www.googleapis.com by less than 1 second Print the current version of Gam with extended details and SSL information ``` gam version extended -GAMADV-XTD3 6.72.14 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.72.15 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.12.3 64-bit final MacOS Sonoma 14.4.1 x86_64 @@ -64,7 +64,7 @@ MacOS High Sierra 10.13.6 x86_64 Path: /Users/Admin/bin/gamadv-xtd3 Version Check: Current: 5.35.08 - Latest: 6.72.14 + Latest: 6.72.15 echo $? 1 ``` @@ -72,7 +72,7 @@ echo $? Print the current version number without details ``` gam version simple -6.72.14 +6.72.15 ``` In Linux/MacOS you can do: ``` @@ -82,7 +82,7 @@ echo $VER Print the current version of Gam and address of this Wiki ``` gam help -GAM 6.72.14 - https://github.com/taers232c/GAMADV-XTD3 +GAM 6.72.15 - https://github.com/taers232c/GAMADV-XTD3 Ross Scroggs Python 3.12.3 64-bit final MacOS Sonoma 14.4.1 x86_64 diff --git a/src/GamUpdate.txt b/src/GamUpdate.txt index 993dc859..36f84b1d 100644 --- a/src/GamUpdate.txt +++ b/src/GamUpdate.txt @@ -2,6 +2,11 @@ Merged GAM-Team version +6.72.15 + +Updated all commands that display tasks to display the due date in GMT as the time portion +is not supported by the API and converting the due date to local time may display the wrong date. + 6.72.14 Upgraded to Python 3.12.3 where possible. diff --git a/src/gam/__init__.py b/src/gam/__init__.py index c3a5f76b..634665e7 100755 --- a/src/gam/__init__.py +++ b/src/gam/__init__.py @@ -4194,6 +4194,7 @@ def SetGlobalVariables(): # Set environment variables so GData API can find cacerts.pem os.environ['REQUESTS_CA_BUNDLE'] = GC.Values[GC.CACERTS_PEM] os.environ['DEFAULT_CA_BUNDLE_PATH'] = GC.Values[GC.CACERTS_PEM] + os.environ['HTTPLIB2_CA_CERTS'] = GC.Values[GC.CACERTS_PEM] os.environ['SSL_CERT_FILE'] = GC.Values[GC.CACERTS_PEM] httplib2.CA_CERTS = GC.Values[GC.CACERTS_PEM] # Needs to be set so oauthlib doesn't puke when Google changes our scopes @@ -71789,7 +71790,7 @@ def getTaskListIDfromTitle(svc, userTasklists, title, user, i, count): return userTasklists, None TASK_SKIP_OBJECTS = ['selfLink'] -TASK_TIME_OBJECTS = ['due', 'completed', 'updated'] +TASK_TIME_OBJECTS = ['completed', 'updated'] def _showTask(tasklist, task, j=0, jcount=0, FJQC=None, compact=False): task['tasklistId'] = tasklist