diff --git a/docs/GamUpdates.md b/docs/GamUpdates.md index 0e88c36a..cae72bf9 100644 --- a/docs/GamUpdates.md +++ b/docs/GamUpdates.md @@ -11,6 +11,46 @@ 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.67.35 + +Added the following options to `` that allow more powerful matching. +``` +nottype +typelist +nottypelist +rolelist +notrolelist +``` +* See: https://github.com/taers232c/GAMADV-XTD3/wiki/Permission-Matches#define-a-match + +### 6.67.34 + +Added option `movetoorgunitdelay ` to `gam create shareddrive ... ou|org|orgunit `. +GAM creates the Shared Drive, verifies that it has been created and then tries to move it to ``. Google seems to +require a delay or the following error is generated. +``` +ERROR: 409: 409 - The operation was aborted. +``` +`movetoorgunitdelay` defaults to 20 seconds which seems to work; `` can range from 0 to 60. + +### 6.67.33 + +Upgraded to OpenSSL 3.2.1 where possible. + +Fixed bug in `gam print shareddrives` where `role` was improperly displayed as `fileOrganizer` +rather than `writer`. + +Added option `guiroles []` to `gam info|print|show shareddrive` that maps +the Drive API role names to the Google Drive GUI role names. +``` +API: GUI +commenter: Commenter +fileOrganizer: Content manager +organizer: Manager +reader: Viewer +writer: Contributor +``` + ### 6.67.32 Updated `` to allow multiple `tdshare commenter|reader|writer` options. diff --git a/docs/How-to-Upgrade-from-Standard-GAM.md b/docs/How-to-Upgrade-from-Standard-GAM.md index 8f54c310..82392e69 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.67.32 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.67.35 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.12.1 64-bit final MacOS Sonoma 14.2.1 x86_64 @@ -1002,7 +1002,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.67.32 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.67.35 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.12.1 64-bit final Windows-10-10.0.17134 AMD64 diff --git a/docs/List-Items.md b/docs/List-Items.md index 0bd2de9b..1da0f7c9 100644 --- a/docs/List-Items.md +++ b/docs/List-Items.md @@ -34,6 +34,7 @@ ::= "(,)*" ::= "(,)*" ::= "(,)*" + ::= "(,)*" ::= "(,)*" ::= "(,)*" ::= "(,)*" diff --git a/docs/Permission-Matches.md b/docs/Permission-Matches.md index 56e773ef..58c5ae24 100644 --- a/docs/Permission-Matches.md +++ b/docs/Permission-Matches.md @@ -18,7 +18,10 @@ contributor|editor|writer| manager|organizer|owner| reader|viewer + ::= "(,)*" + ::= anyone|domain|group|user + ::= "(,)*" ::= @ ::= "(,)*" @@ -31,7 +34,8 @@ ::= pm|permissionmatch [not] - [type ] [role|notrole ] + [type|nottype ] [role|notrole ] + [typelist|nottypelist ] [rolelist|notrolelist ] [allowfilediscovery|withlink ] [emailaddress ] [emailaddressList ] [permissionidlist @@ -72,9 +76,14 @@ In the `print/show drivefileacls` and `create/delete permissions` commands you c ## Define a Match * `pm|permissionmatch` - Start of permission match definition. * `not` - Negate the match. -* `type ` - The type of the grantee. -* `role ` - The role granted by this permission. -* `notrole ` - The role granted by this permission. +* `type ` - The type of the grantee must match. +* `nottype ` - The type of the grantee must not match. +* `typelist ` - The type of the grantee must match any value in the list. +* `nottypelist ` - The type of the grantee must not match any value in the list. +* `role ` - The role granted by this permission must match. +* `notrole ` - The role granted by this permission must not match. +* `rolelist ` - The role granted by this permission must match any value in the list.. +* `notrolelist ` - The role granted by this permission must not match any value in the list.. * `allowfilediscovery|withlink ` - Whether a link is required or whether the file can be discovered through search. * `emailaddress ` - For types user and group, the required email address. * `emailaddresslist ` - For types user and group, a list of required email addresses; any one of which must match. diff --git a/docs/Users-Shared-Drives.md b/docs/Users-Shared-Drives.md index 74e7d3c0..6c54bd1e 100644 --- a/docs/Users-Shared-Drives.md +++ b/docs/Users-Shared-Drives.md @@ -277,12 +277,15 @@ gam unhide teamdrive ``` gam show teamdriveinfo gam info teamdrive - [fields ] [formatjson] + [fields ] + [guiroles [] [formatjson] gam show teamdriveinfo - [fields ] [formatjson] + [fields ] + [guiroles [] [formatjson] gam show teamdrives [matchname ] (role|roles )* - [fields ] [formatjson] + [fields ] + [guiroles [] [formatjson] ``` By default, Gam displays all Teams Drives accessible by the user. * `matchname ` - Display Shared Drives with names that match a pattern. @@ -301,10 +304,20 @@ By default, Gam displays all Teams Drives accessible by the user. The Google Drive API does not list roles for Shared Drives so GAM generates a role from the capabilities: * `commenter - canComment: True, canEdit: False` -* `fileOrganizer - canAddChildren: True, canManageMembers: False` +* `reader - canComment: False, canEdit: False` +* `writer - canEdit: True, canTrashChildren: False` +* `fileOrganizer - canTrashChildren: True, canManageMembers: False` * `organizer - canManageMembers: True` -* `reader - canCopy': True, canComment: False` -* `writer - canEdit: True, canManageMembers: False` + +By default, the Drive API role names are displayed, use `guiroles` to display the Google Drive GUI role names. +``` +API: GUI +commenter: Commenter +fileOrganizer: Content manager +organizer: Manager +reader: Viewer +writer: Contributor +``` By default, Gam displays the information as columns of fields; the following option causes the output to be in JSON format, * `formatjson` - Display the fields in JSON format. diff --git a/docs/Version-and-Help.md b/docs/Version-and-Help.md index 68ee42c6..ded26c80 100644 --- a/docs/Version-and-Help.md +++ b/docs/Version-and-Help.md @@ -4,7 +4,7 @@ Print the current version of Gam with details ``` gam version -GAMADV-XTD3 6.67.32 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.67.35 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.12.1 64-bit final MacOS Sonoma 14.2.1 x86_64 @@ -16,7 +16,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.67.32 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.67.35 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.12.1 64-bit final MacOS Sonoma 14.2.1 x86_64 @@ -28,7 +28,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.67.32 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource +GAMADV-XTD3 6.67.35 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource Ross Scroggs Python 3.12.1 64-bit final MacOS Sonoma 14.2.1 x86_64 @@ -65,7 +65,7 @@ MacOS High Sierra 10.13.6 x86_64 Path: /Users/Admin/bin/gamadv-xtd3 Version Check: Current: 5.35.08 - Latest: 6.67.32 + Latest: 6.67.35 echo $? 1 ``` @@ -73,7 +73,7 @@ echo $? Print the current version number without details ``` gam version simple -6.67.32 +6.67.35 ``` In Linux/MacOS you can do: ``` @@ -83,7 +83,7 @@ echo $VER Print the current version of Gam and address of this Wiki ``` gam help -GAM 6.67.32 - https://github.com/taers232c/GAMADV-XTD3 +GAM 6.67.35 - https://github.com/taers232c/GAMADV-XTD3 Ross Scroggs Python 3.12.1 64-bit final MacOS Sonoma 14.2.1 x86_64 diff --git a/src/GamCommands.txt b/src/GamCommands.txt index 4c4b3070..c1058dd2 100644 --- a/src/GamCommands.txt +++ b/src/GamCommands.txt @@ -664,6 +664,7 @@ If an item contains spaces, it should be surrounded by ". ::= "(,)*" ::= "(,)*" ::= "(,)*" + ::= "(,)*" ::= "(,)*" ::= "(,)*" ::= "(,)*" @@ -4635,6 +4636,23 @@ gam show shareddrives [fields ] [guiroles []] [formatjson] + ::= + pm|permissionmatch [not] + [type|nottype ] [role|notrole ] + [typelist|nottypelist ] [rolelist|notrolelist ] + [allowfilediscovery|withlink ] + [emailaddress ] [emailaddressList ] + [permissionidlist + [name|displayname ] + [domain|notdomain ] [domainlist|notdomainlist ] + [expirationstart