mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-28 09:51:36 +00:00
Two updates
Added `permissionidlist <PermissionIDList>` to `<PermissionMatch>` Added option `exportlinkeddrivefiles <Boolean>` to `gam create vaultexport`
This commit is contained in:
@@ -11,6 +11,12 @@ 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.22
|
||||
|
||||
Added `permissionidlist <PermissionIDList>` to `<PermissionMatch>` that allows matching any permission ID in a list.
|
||||
|
||||
Added option `exportlinkeddrivefiles <Boolean>` to `gam create vaultexport` that is used with `corpus mail`.
|
||||
|
||||
### 6.67.21
|
||||
|
||||
Updated `gam remove aliases <EmailAddress> user|group <EmailAddressEntity>` to give a more informative
|
||||
|
||||
@@ -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.21 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
GAMADV-XTD3 6.67.22 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
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.21 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
GAMADV-XTD3 6.67.22 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
Python 3.12.1 64-bit final
|
||||
Windows-10-10.0.17134 AMD64
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
[type <DriveFileACLType>] [role|notrole <DriveFileACLRole>]
|
||||
[allowfilediscovery|withlink <Boolean>]
|
||||
[emailaddress <RegularExpression>] [emailaddressList <EmailAddressList>]
|
||||
[permissionidlist <PermissionIDList>
|
||||
[name|displayname <String>]
|
||||
[domain|notdomain <RegularExpression>] [domainlist|notdomainlist <DomainNameList>]
|
||||
[expirationstart <Time>] [expirationend <Time>]
|
||||
@@ -77,6 +78,7 @@ In the `print/show drivefileacls` and `create/delete permissions` commands you c
|
||||
* `allowfilediscovery|withlink <Boolean>` - Whether a link is required or whether the file can be discovered through search.
|
||||
* `emailaddress <RegularExpression>` - For types user and group, the required email address.
|
||||
* `emailaddresslist <EmailAddressList>` - For types user and group, a list of required email addresses; any one of which must match.
|
||||
* `permissionidlist <PermissionIDListList>` - A list of required permission IDs; any one of which must match.
|
||||
* `name|displayname <RegularExpression>` - For types domain, user and group, the displayable name.
|
||||
* `domain <RegularExpression>` - For type domain, the required domain name. For types user and group, the required domain name in the email address.
|
||||
* `notdomain <RegularExpression>` - For type domain, any domain name that doesn't match. For types user and group, any domain name that doesn't match in the email address.
|
||||
|
||||
@@ -219,7 +219,7 @@ gam create vaultexport|export matter <MatterItem> [name <String>] corpus calenda
|
||||
[includeshareddrives <Boolean>] [driveversiondate <Date>|<Time>] [includeaccessinfo <Boolean>]
|
||||
[includerooms <Boolean>]
|
||||
[excludedrafts <Boolean>] [format mbox|pst]
|
||||
[showconfidentialmodecontent <Boolean>] [usenewexport <Boolean>]
|
||||
[showconfidentialmodecontent <Boolean>] [usenewexport <Boolean>] [exportlinkeddrivefiles <Boolean>]
|
||||
[covereddata calllogs|textmessages|voicemails]
|
||||
[region any|europe|us] [showdetails|returnidonly]
|
||||
```
|
||||
@@ -305,6 +305,10 @@ For `corpus mail`, you can specify whether to use the new export system:
|
||||
* `usenewexport false` - Do not use the new export system
|
||||
* `usenewexport true` - Use the new export system
|
||||
|
||||
For `corpus mail`, you can specify whether to enable exporting linked Drive files:
|
||||
* `exportlinkeddrivefiles false` - Do not export linked Drive files
|
||||
* `exportlinkeddrivefiles true` - Export linked Drive files
|
||||
|
||||
See: https://support.google.com/vault/answer/4388708#new_gmail_export&zippy=%2Cfebruary-new-gmail-export-system-available
|
||||
|
||||
For `corpus mail`, `corpus groups`, `corpus hangouts_chat`and `corpus voice`, you can specify the format of the exported data:
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
Print the current version of Gam with details
|
||||
```
|
||||
gam version
|
||||
GAMADV-XTD3 6.67.21 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
GAMADV-XTD3 6.67.22 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
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.21 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
GAMADV-XTD3 6.67.22 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
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.21 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
GAMADV-XTD3 6.67.22 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
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.21
|
||||
Latest: 6.67.22
|
||||
echo $?
|
||||
1
|
||||
```
|
||||
@@ -73,7 +73,7 @@ echo $?
|
||||
Print the current version number without details
|
||||
```
|
||||
gam version simple
|
||||
6.67.21
|
||||
6.67.22
|
||||
```
|
||||
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.21 - https://github.com/taers232c/GAMADV-XTD3
|
||||
GAM 6.67.22 - https://github.com/taers232c/GAMADV-XTD3
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
Python 3.12.1 64-bit final
|
||||
MacOS Sonoma 14.2.1 x86_64
|
||||
|
||||
@@ -4939,7 +4939,7 @@ gam create vaultexport|export matter <MatterItem> [name <String>] corpus calenda
|
||||
[includeshareddrives <Boolean>] [driveversiondate <Date>|<Time>] [includeaccessinfo <Boolean>]
|
||||
[includerooms <Boolean>]
|
||||
[excludedrafts <Boolean>] [format mbox|pst]
|
||||
[showconfidentialmodecontent <Boolean>] [usenewexport <Boolean>]
|
||||
[showconfidentialmodecontent <Boolean>] [usenewexport <Boolean>] [exportlinkeddrivefiles <Boolean>]
|
||||
[covereddata calllogs|textmessages|voicemails]
|
||||
[region any|europe|us] [showdetails|returnidonly]
|
||||
gam delete vaultexport|export <ExportItem> matter <MatterItem>
|
||||
|
||||
@@ -2,6 +2,12 @@
|
||||
|
||||
Merged GAM-Team version
|
||||
|
||||
6.67.22
|
||||
|
||||
Added `permissionidlist <PermissionIDList>` to `<PermissionMatch>` that allows matching any permission ID in a list.
|
||||
|
||||
Added option `exportlinkeddrivefiles <Boolean>` to `gam create vaultexport` that is used with `corpus mail`.
|
||||
|
||||
6.67.21
|
||||
|
||||
Updated `gam remove aliases <EmailAddress> user|group <EmailAddressEntity>` to give a more informative
|
||||
|
||||
@@ -38202,7 +38202,7 @@ def _validateVaultQuery(body, corpusArgumentMap):
|
||||
# [includeshareddrives <Boolean>] [driveversiondate <Date>|<Time>] [includeaccessinfo <Boolean>]
|
||||
# [includerooms <Boolean>]
|
||||
# [excludedrafts <Boolean>] [format mbox|pst]
|
||||
# [showconfidentialmodecontent <Boolean>] [usenewexport <Boolean>]
|
||||
# [showconfidentialmodecontent <Boolean>] [usenewexport <Boolean>] [exportlinkeddrivefiles <Boolean>]
|
||||
# [covereddata calllogs|textmessages|voicemails]
|
||||
# [region any|europe|us] [showdetails|returnidonly]
|
||||
def doCreateVaultExport():
|
||||
@@ -38211,6 +38211,7 @@ def doCreateVaultExport():
|
||||
body = {'query': {'dataScope': 'ALL_DATA'}, 'exportOptions': {}}
|
||||
exportFormat = None
|
||||
showConfidentialModeContent = None
|
||||
exportLinkedDriveFiles = None
|
||||
returnIdOnly = showDetails = False
|
||||
useNewExport = None
|
||||
while Cmd.ArgumentsRemaining():
|
||||
@@ -38228,6 +38229,8 @@ def doCreateVaultExport():
|
||||
exportFormat = getChoice(VAULT_EXPORT_FORMAT_MAP, mapChoice=True)
|
||||
elif myarg == 'showconfidentialmodecontent':
|
||||
showConfidentialModeContent = getBoolean()
|
||||
elif myarg == 'exportlinkeddrivefiles':
|
||||
exportLinkedDriveFiles = getBoolean()
|
||||
elif myarg == 'region':
|
||||
body['exportOptions']['region'] = getChoice(VAULT_EXPORT_REGION_MAP, mapChoice=True)
|
||||
elif myarg == 'includeaccessinfo':
|
||||
@@ -38260,6 +38263,8 @@ def doCreateVaultExport():
|
||||
body['exportOptions'][optionsField]['showConfidentialModeContent'] = showConfidentialModeContent
|
||||
if useNewExport is not None:
|
||||
body['exportOptions'][optionsField]['useNewExport'] = useNewExport
|
||||
if exportLinkedDriveFiles is not None:
|
||||
body['exportOptions'][optionsField]['exportLinkedDriveFiles'] = exportLinkedDriveFiles
|
||||
try:
|
||||
export = callGAPI(v.matters().exports(), 'create',
|
||||
throwReasons=[GAPI.ALREADY_EXISTS, GAPI.BAD_REQUEST, GAPI.BACKEND_ERROR, GAPI.INVALID_ARGUMENT,
|
||||
@@ -40733,7 +40738,7 @@ class PasswordOptions():
|
||||
body[up] = body[up][5:]
|
||||
try:
|
||||
body[up] = base64.b64decode(body[up]).hex()
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
def AssignPassword(self, body, notify, notFoundBody, createIfNotFound):
|
||||
@@ -52502,6 +52507,9 @@ class PermissionMatch():
|
||||
elif myarg == 'emailaddresslist':
|
||||
body[myarg] = set(getString(Cmd.OB_EMAIL_ADDRESS_LIST).replace(',', ' ').split())
|
||||
self.permissionFields.add('emailAddress')
|
||||
elif myarg == 'permissionidlist':
|
||||
body[myarg] = set(getString(Cmd.OB_PERMISSION_ID_LIST).replace(',', ' ').split())
|
||||
self.permissionFields.add('id')
|
||||
elif myarg in {'domain', 'notdomain'}:
|
||||
body[myarg] = getREPattern(re.IGNORECASE)
|
||||
self.permissionFields.add('domain')
|
||||
@@ -52606,6 +52614,13 @@ class PermissionMatch():
|
||||
break
|
||||
else:
|
||||
break
|
||||
elif field in {'permissionidlist'}:
|
||||
permissionId = permission.get('id')
|
||||
if permissionId:
|
||||
if permissionId not in value:
|
||||
break
|
||||
else:
|
||||
break
|
||||
elif field not in {'domain', 'notdomain', 'domainlist', 'notdomainlist'}:
|
||||
if not value.match(permission.get(field, '')):
|
||||
break
|
||||
|
||||
@@ -930,6 +930,7 @@ class GamCLArgs():
|
||||
OB_ORGUNIT_PATH = 'OrgUnitPath'
|
||||
OB_PARAMETER_VALUE = 'ParameterValue'
|
||||
OB_PASSWORD = 'Password'
|
||||
OB_PERMISSION_ID_LIST = 'PermissionIDList'
|
||||
OB_PHOTO_FILENAME_PATTERN = 'FilenameNamePattern'
|
||||
OB_PRINTER_ID = 'PrinterID'
|
||||
OB_PRIVILEGE_LIST = 'PrivilegeList'
|
||||
|
||||
Reference in New Issue
Block a user