From ae6570823b124eeee92f1a52981ce632348fbb7e Mon Sep 17 00:00:00 2001 From: Ross Scroggs Date: Fri, 3 Apr 2026 11:34:44 -0700 Subject: [PATCH] Added `preview` to `updateprimaryemail [preview]` --- wiki/Cloud-Identity-Groups.md | 6 +++++- wiki/GamUpdates.md | 11 +++++++++++ wiki/Groups.md | 7 +++++-- wiki/How-to-Upgrade-Legacy-GAM-to-GAM7.md | 6 +++--- wiki/Users.md | 10 ++++++---- wiki/Version-and-Help.md | 20 ++++++++++---------- 6 files changed, 40 insertions(+), 20 deletions(-) diff --git a/wiki/Cloud-Identity-Groups.md b/wiki/Cloud-Identity-Groups.md index 26f27684..4c574ca5 100644 --- a/wiki/Cloud-Identity-Groups.md +++ b/wiki/Cloud-Identity-Groups.md @@ -240,6 +240,7 @@ gam create cigroup [security|makesecuritygroup] [locked] [dynamic ] gam update cigroup [copyfrom ] + [updateprimaryemail [preview]] [security|makesecuritygroup| dynamicsecurity|makedynamicsecuritygroup| lockedsecurity|makelockedsecuritygroup] @@ -265,12 +266,15 @@ You can simply update a group's primary email address with the `email` option. ``` gam update cigroup groupold@domain.com email groupnew@domain.com ``` -The `updateprimaryemail ` option allows modification several group's +The `updateprimaryemail [preview]` option allows modification several group's current primary email address. For example, to change the domain of a set of groups from the current domain.com to newdomain.com, make a CSV file Groups.csv with a column `email` that contains the group email addresses that are to be changed. +You can list all groups with: `gam redirect csv ./Groups.csv print cigroups` ``` gam update cigroup csvfile Groups.csv:email updateprimaryemail "^(.+)@domain.com$" "\1@newdomain.com" ``` +The `preview` option allows verification of the primary email address changes before commiting the changes. + If the group's current primary email address does not match the then no modification is made. ## Display information about individual groups diff --git a/wiki/GamUpdates.md b/wiki/GamUpdates.md index 055c15ab..a139bf65 100644 --- a/wiki/GamUpdates.md +++ b/wiki/GamUpdates.md @@ -10,6 +10,17 @@ Add the `-s` option to the end of the above commands to suppress creating the `g See [Downloads-Installs-GAM7](https://github.com/GAM-team/GAM/wiki/Downloads-Installs) for Windows or other options, including manual installation +### 7.39.05 + +Added optional argument `preview` to `updateprimaryemail [preview]` +for the following commands that causes GAM to preview, but not perform, primary email address changes. +This allows verification of the primary email address changes before commiting the changes. +``` +gam update group +gam update cigroup +gam update user +``` + ### 7.39.04 Added `updateprimaryemail ` option to diff --git a/wiki/Groups.md b/wiki/Groups.md index d8755227..67837d00 100644 --- a/wiki/Groups.md +++ b/wiki/Groups.md @@ -349,7 +349,7 @@ gam create group [copyfrom ] * [verifynotinvitable] gam update group|groups [email ] - [updateprimaryemail ] + [updateprimaryemail [preview]] [copyfrom ] * [makesecuritygroup|security] [admincreated ] @@ -370,12 +370,15 @@ You can simply update a group's primary email address with the `email` option. ``` gam update group groupold@domain.com email groupnew@domain.com ``` -The `updateprimaryemail ` option allows modification several group's +The `updateprimaryemail [preview]` option allows modification several group's current primary email address. For example, to change the domain of a set of groups from the current domain.com to newdomain.com, make a CSV file Groups.csv with a column `email` that contains the group email addresses that are to be changed. +You can list all groups with: `gam redirect csv ./Groups.csv print groups` ``` gam update group csvfile Groups.csv:email updateprimaryemail "^(.+)@domain.com$" "\1@newdomain.com" ``` +The `preview` option allows verification of the primary email address changes before commiting the changes. + If the group's current primary email address does not match the then no modification is made. ## Update a group's settings with JSON data diff --git a/wiki/How-to-Upgrade-Legacy-GAM-to-GAM7.md b/wiki/How-to-Upgrade-Legacy-GAM-to-GAM7.md index afbe6ef5..68f9feea 100644 --- a/wiki/How-to-Upgrade-Legacy-GAM-to-GAM7.md +++ b/wiki/How-to-Upgrade-Legacy-GAM-to-GAM7.md @@ -251,10 +251,10 @@ writes the credentials into the file oauth2.txt. ``` gamteam@server:/Users/gamteam$ rm -f /Users/gamteam/GAMConfig/oauth2.txt gamteam@server:/Users/gamteam$ gam version -GAM 7.39.04 - https://github.com/GAM-team/GAM - pyinstaller +GAM 7.39.05 - https://github.com/GAM-team/GAM - pyinstaller GAM Team Python 3.14.3 64-bit final -macOS Tahoe 26.3.1 arm64 +macOS Tahoe 26.4 arm64 Path: /Users/gamteam/bin/gam7 Config File: /Users/gamteam/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com @@ -1034,7 +1034,7 @@ writes the credentials into the file oauth2.txt. ``` C:\>del C:\GAMConfig\oauth2.txt C:\>gam version -GAM 7.39.04 - https://github.com/GAM-team/GAM - pythonsource +GAM 7.39.05 - https://github.com/GAM-team/GAM - pythonsource GAM Team Python 3.14.3 64-bit final Windows 11 10.0.26200 AMD64 diff --git a/wiki/Users.md b/wiki/Users.md index 70f7e250..48a4929e 100644 --- a/wiki/Users.md +++ b/wiki/Users.md @@ -666,7 +666,7 @@ If the mailbox is setup, a zero return code is returned; if the retries are exha ``` gam update user [ignorenullpassword] * [verifynotinvitable|alwaysevict] [noactionifalias] - [updateprimaryemail ] + [updateprimaryemail [preview]] [updateoufromgroup [charset ] [columndelimiter ] [noescapechar ] [quotechar ] [fields ] [keyfield ] [datafield ]] @@ -688,7 +688,7 @@ gam update user [ignorenullpassword] * [logpassword ] gam update users [ignorenullpassword] * [verifynotinvitable|alwaysevict] [noactionifalias] - [updateprimaryemail ] + [updateprimaryemail [preview]] [updateoufromgroup [charset ] [columndelimiter ] [noescapechar ] [quotechar ] [fields ] [keyfield ] [datafield ]] @@ -709,7 +709,7 @@ gam update users [ignorenullpassword] * [logpassword ] gam update users [ignorenullpassword] * [verifynotinvitable|alwaysevict] [noactionifalias] - [updateprimaryemail `< ] + [updateprimaryemail [preview]] [updateoufromgroup [charset ] [columndelimiter ] [noescapechar ] [quotechar ] [fields ] [keyfield ] [datafield ]] @@ -812,7 +812,7 @@ You can simply update a user's primary email address with the `primaryemail` opt ``` gam update user userold@domain.com primaryemail usernew@domain.com ``` -The `updateprimaryemail ` option allows modification of the user's current primary email address. +The `updateprimaryemail [preview]` option allows modification of the user's current primary email address. For example, to change the domain of a set of users from the current domain.com to newdomain.com: ``` @@ -822,6 +822,8 @@ To change graduating students email addresses from flastname@domain.com to flast ``` gam ou /Path/To/Ou update user updateprimaryemail "^(.+)@(.+)$" "\1_grad@\2" ``` +The `preview` option allows verification of the primary email address changes before commiting the changes. + If the user's current primary email address does not match the then no modification is made. ## Update a user's attributes with JSON data diff --git a/wiki/Version-and-Help.md b/wiki/Version-and-Help.md index be546719..fd7b5560 100644 --- a/wiki/Version-and-Help.md +++ b/wiki/Version-and-Help.md @@ -3,10 +3,10 @@ Print the current version of Gam with details ``` gam version -GAM 7.39.04 - https://github.com/GAM-team/GAM - pyinstaller +GAM 7.39.05 - https://github.com/GAM-team/GAM - pyinstaller GAM Team Python 3.14.3 64-bit final -macOS Tahoe 26.3.1 arm64 +macOS Tahoe 26.4 arm64 Path: /Users/gamteam/bin/gam7 Config File: /Users/gamteam/GamConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com Time: 2026-02-15T07:51:00-08:00 @@ -15,10 +15,10 @@ Time: 2026-02-15T07:51:00-08:00 Print the current version of Gam with details and time offset information ``` gam version timeoffset -GAM 7.39.04 - https://github.com/GAM-team/GAM - pyinstaller +GAM 7.39.05 - https://github.com/GAM-team/GAM - pyinstaller GAM Team Python 3.14.3 64-bit final -macOS Tahoe 26.3.1 arm64 +macOS Tahoe 26.4 arm64 Path: /Users/gamteam/bin/gam7 Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com Your system time differs from www.googleapis.com by less than 1 second @@ -27,10 +27,10 @@ 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 -GAM 7.39.04 - https://github.com/GAM-team/GAM - pyinstaller +GAM 7.39.05 - https://github.com/GAM-team/GAM - pyinstaller GAM Team Python 3.14.3 64-bit final -macOS Tahoe 26.3.1 arm64 +macOS Tahoe 26.4 arm64 Path: /Users/gamteam/bin/gam7 Config File: /Users/gamteam/GamConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com Time: 2026-02-15T07:51:00-08:00 @@ -68,7 +68,7 @@ MacOS High Sierra 10.13.6 x86_64 Path: /Users/gamteam/bin/gam7 Version Check: Current: 5.35.08 - Latest: 7.39.04 + Latest: 7.39.05 echo $? 1 ``` @@ -76,7 +76,7 @@ echo $? Print the current version number without details ``` gam version simple -7.39.04 +7.39.05 ``` In Linux/MacOS you can do: ``` @@ -86,10 +86,10 @@ echo $VER Print the current version of Gam and address of this Wiki ``` gam help -GAM 7.39.04 - https://github.com/GAM-team/GAM +GAM 7.39.05 - https://github.com/GAM-team/GAM GAM Team Python 3.14.3 64-bit final -macOS Tahoe 26.3.1 arm64 +macOS Tahoe 26.4 arm64 Path: /Users/gamteam/bin/gam7 Config File: /Users/gamteam/GamConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com Time: 2026-02-15T07:51:00-08:00