mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-23 23:51:36 +00:00
Compare commits
28 Commits
20250409.2
...
20250415.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1b234d5aa7 | ||
|
|
32dc4c9de4 | ||
|
|
a150288a6f | ||
|
|
df053c36a6 | ||
|
|
0d01850356 | ||
|
|
6e9a68627b | ||
|
|
904f743f39 | ||
|
|
64c194e4d0 | ||
|
|
98c7ea08f8 | ||
|
|
a55f065cfb | ||
|
|
8eed07cb2e | ||
|
|
01af866c7b | ||
|
|
614ebd11c5 | ||
|
|
da1266e7cc | ||
|
|
06a6fff029 | ||
|
|
6da2b14111 | ||
|
|
0a89e82f2d | ||
|
|
33051d10c4 | ||
|
|
0652a91f89 | ||
|
|
fed4caeac0 | ||
|
|
f82ced5ade | ||
|
|
56e9027f38 | ||
|
|
73dbec522f | ||
|
|
cc01655b33 | ||
|
|
ac52f936d8 | ||
|
|
b851758baa | ||
|
|
72acbea40f | ||
|
|
8ff87db537 |
21
.github/workflows/build.yml
vendored
21
.github/workflows/build.yml
vendored
@@ -88,15 +88,12 @@ jobs:
|
||||
goal: build
|
||||
arch: Win64
|
||||
openssl_archs: VC-WIN64A
|
||||
# disable 3.9 test for now since it's oldest and due
|
||||
# for removal in Oct 2025. We only have 13 jid accounts
|
||||
# so we need this one off but can re-enable at some point
|
||||
# if we feel the need.
|
||||
#- os: ubuntu-24.04
|
||||
# goal: test
|
||||
# python: "3.9"
|
||||
# jid: 11
|
||||
# arch: x86_64
|
||||
#- os: windows-11-arm
|
||||
# jid: 14
|
||||
# goal: build
|
||||
# arch: arm64
|
||||
# openssl_archs: VC-CLANG-WIN64-CLANGASM-ARM
|
||||
# continue-on-error: true
|
||||
- os: ubuntu-24.04
|
||||
goal: test
|
||||
python: "3.10"
|
||||
@@ -270,6 +267,12 @@ jobs:
|
||||
echo "PYTHON=${PYTHON_SOURCE_PATH}/PCbuild/${PYEXTERNALS_PATH}/python.exe" >> $GITHUB_ENV
|
||||
echo "GAM_ARCHIVE_ARCH=${GAM_ARCHIVE_ARCH}" >> $GITHUB_ENV
|
||||
echo "WIX_ARCH=${WIX_ARCH}" >> $GITHUB_ENV
|
||||
if [[ "$arch" == "arm64" ]]; then
|
||||
MAKE=make
|
||||
MAKEOPT="-j$(nproc)"
|
||||
echo "VSCMD_DEBUG=3" >> $GITHUB_ENV
|
||||
echo "PATH=${PATH}:${VCINSTALLDIR}\Tools\Llvm\ARM64\bin" >> $GITHUB_ENV
|
||||
fi
|
||||
fi
|
||||
echo "We'll run make with: ${MAKEOPT}"
|
||||
echo "staticx=${staticx}" >> $GITHUB_ENV
|
||||
|
||||
@@ -7163,7 +7163,8 @@ gam <UserTypeEntity> print filecounts [todrive <ToDriveAttribute>*]
|
||||
[filenamematchpattern <REMatchPattern>]
|
||||
<PermissionMatch>* [<PermissionMatchMode>] [<PermissionMatchAction>]
|
||||
[excludetrashed]
|
||||
[showsize] [showmimetypesize] [showlastmodification]
|
||||
[showsize] [showmimetypesize]
|
||||
[showlastmodification] [pathdelimiter <Character>]
|
||||
(addcsvdata <FieldName> <String>)*
|
||||
[summary none|only|plus] [summaryuser <String>]
|
||||
gam <UserTypeEntity> show filecounts
|
||||
@@ -7178,7 +7179,8 @@ gam <UserTypeEntity> show filecounts
|
||||
[filenamematchpattern <REMatchPattern>]
|
||||
<PermissionMatch>* [<PermissionMatchMode>] [<PermissionMatchAction>]
|
||||
[excludetrashed]
|
||||
[showsize] [showmimetypesize] [showlastmodification]
|
||||
[showsize] [showmimetypesize]
|
||||
[showlastmodification] [pathdelimiter <Character>]
|
||||
[summary none|only|plus] [summaryuser <String>]
|
||||
|
||||
gam <UserTypeEntity> print filesharecounts [todrive <ToDriveAttribute>*]
|
||||
@@ -7308,6 +7310,14 @@ gam <UserTypeEntity> print driveactivity [todrive <ToDriveAttribute>*]
|
||||
usageindrivetrash
|
||||
<DriveSettingsFieldNameList> ::= "<DriveSettingsFieldName>(,<DriveSettingsFieldName>)*"
|
||||
|
||||
gam <UserTypeEntity> print drivelastmodification [todrive <ToDriveAttribute>*]
|
||||
[select <SharedDriveEntity>]
|
||||
[pathdelimiter <Character>]
|
||||
(addcsvdata <FieldName> <String>)*
|
||||
gam <UserTypeEntity> show drivelastmodification
|
||||
[select <SharedDriveEntity>]
|
||||
[pathdelimiter <Character>]
|
||||
|
||||
gam <UserTypeEntity> print drivesettings [todrive <ToDriveAttribute>*]
|
||||
[allfields|<DriveSettingsFieldName>*|(fields <DriveSettingsFieldNameList>)]
|
||||
[delimiter <Character>] [showusagebytes]
|
||||
|
||||
@@ -1,8 +1,37 @@
|
||||
7.06.04
|
||||
|
||||
Fixed bug in `gam report <ActivityApplictionName>` where a report with no activities
|
||||
was not displaying any output.
|
||||
|
||||
7.06.03
|
||||
|
||||
Fixed bug in `gam <UserTypeEntity> print|show drivelastmodification` that caused a trap
|
||||
when an empty drive was specified.
|
||||
|
||||
7.06.02
|
||||
|
||||
Updated `gam <UserTypeEntity> print|show filecounts ... showlastmodification` to include
|
||||
file mimetype and path information for the last modified file.
|
||||
|
||||
Added simple commands to get information about the last modified file on a drive.
|
||||
By default, a user's My Drive is processed; optionally, a Shared Drive can be processed.
|
||||
```
|
||||
gam <UserTypeEntity> print drivelastmodification [todrive <ToDriveAttribute>*]
|
||||
[select <SharedDriveEntity>]
|
||||
[pathdelimiter <Character>]
|
||||
(addcsvdata <FieldName> <String>)*
|
||||
gam <UserTypeEntity> show drivelastmodification
|
||||
[select <SharedDriveEntity>]
|
||||
[pathdelimiter <Character>]
|
||||
```
|
||||
|
||||
7.06.01
|
||||
|
||||
Updated `gam <UserTypeEntity> create|update drivefileacl ... expiration <Time>`
|
||||
to handle additional API errors.
|
||||
|
||||
Updated to Python 3.13.3.
|
||||
|
||||
7.06.00
|
||||
|
||||
Upgraded to OpenSSL 3.5.0.
|
||||
|
||||
@@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki
|
||||
"""
|
||||
|
||||
__author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
|
||||
__version__ = '7.06.01'
|
||||
__version__ = '7.06.04'
|
||||
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
||||
|
||||
#pylint: disable=wrong-import-position
|
||||
@@ -14145,6 +14145,7 @@ def doReport():
|
||||
startDateTime += oneDay
|
||||
csvPF.writeCSVfile(f'Customer Report - {tryDate}')
|
||||
else: # activityReports
|
||||
csvPF.SetTitles('name')
|
||||
if addCSVData:
|
||||
csvPF.AddTitles(sorted(addCSVData.keys()))
|
||||
if select:
|
||||
@@ -14303,8 +14304,7 @@ def doReport():
|
||||
row = {'name': 'NoActivities'}
|
||||
if addCSVData:
|
||||
row.update(addCSVData)
|
||||
csvPF.WriteRowTitles(row)
|
||||
csvPF.SetSortTitles(['name'])
|
||||
csvPF.WriteRowTitles(row)
|
||||
else:
|
||||
if eventRowFilter:
|
||||
csvPF.SetRowFilter([], GC.Values[GC.CSV_OUTPUT_ROW_FILTER_MODE])
|
||||
@@ -28152,10 +28152,18 @@ CHROME_SCHEMA_TYPE_MESSAGE = {
|
||||
{'autoupdatecheckperiodminutesnew':
|
||||
{'casedField': 'autoUpdateCheckPeriodMinutesNew',
|
||||
'type': 'duration', 'minVal': 1, 'maxVal': 720, 'scale': 60}},
|
||||
'chrome.users.AutoUpdateCheckPeriodNewV2':
|
||||
{'autoupdatecheckperiodminutesnew':
|
||||
{'casedField': 'autoUpdateCheckPeriodMinutesNew',
|
||||
'type': 'duration', 'minVal': 1, 'maxVal': 720, 'scale': 60}},
|
||||
'chrome.users.BrowserSwitcherDelayDuration':
|
||||
{'browserswitcherdelayduration':
|
||||
{'casedField': 'browserSwitcherDelayDuration',
|
||||
'type': 'duration', 'minVal': 0, 'maxVal': 30, 'scale': 1}},
|
||||
'chrome.users.CloudReportingUploadFrequencyV2':
|
||||
{'cloudreportinguploadfrequency':
|
||||
{'casedField': 'cloudReportingUploadFrequency',
|
||||
'type': 'count', 'minVal': 3, 'maxVal': 24, 'scale': 1}},
|
||||
'chrome.users.FetchKeepaliveDurationSecondsOnShutdown':
|
||||
{'fetchkeepalivedurationsecondsonshutdown':
|
||||
{'casedField': 'fetchKeepaliveDurationSecondsOnShutdown',
|
||||
@@ -28172,6 +28180,10 @@ CHROME_SCHEMA_TYPE_MESSAGE = {
|
||||
{'printjobhistoryexpirationperioddaysnew':
|
||||
{'casedField': 'printJobHistoryExpirationPeriodDaysNew',
|
||||
'type': 'duration', 'minVal': -1, 'maxVal': None, 'scale': 86400}},
|
||||
'chrome.users.RelaunchNotificationWithDurationV2':
|
||||
{'relaunchnotificationperiodduration':
|
||||
{'casedField': 'relaunchNotificationPeriodDuration',
|
||||
'type': 'duration', 'minVal': -1, 'maxVal': None, 'scale': 3600}},
|
||||
'chrome.users.SecurityTokenSessionSettings':
|
||||
{'securitytokensessionnotificationseconds':
|
||||
{'casedField': 'securityTokenSessionNotificationSeconds',
|
||||
@@ -56474,6 +56486,45 @@ def printFileParentTree(users):
|
||||
kcount -= 1
|
||||
csvPF.writeCSVfile('Drive File Parent Tree')
|
||||
|
||||
# Last file modification utilities
|
||||
def _initLastModification():
|
||||
return {'lastModifiedFileId': '', 'lastModifiedFileName': '',
|
||||
'lastModifiedFileMimeType': '', 'lastModifiedFilePath': '',
|
||||
'lastModifyingUser': '', 'lastModifiedTime': NEVER_TIME,
|
||||
'fileEntryInfo': {}}
|
||||
|
||||
def _checkUpdateLastModifiction(f_file, userLastModification):
|
||||
if f_file.get('modifiedTime', NEVER_TIME) > userLastModification['lastModifiedTime'] and 'lastModifyingUser' in f_file:
|
||||
userLastModification['lastModifiedFileId'] = f_file['id']
|
||||
userLastModification['lastModifiedFileName'] = _stripControlCharsFromName(f_file['name'])
|
||||
userLastModification['lastModifiedFileMimeType'] = f_file['mimeType']
|
||||
userLastModification['lastModifiedTime'] = f_file['modifiedTime']
|
||||
userLastModification['lastModifyingUser'] = f_file['lastModifyingUser'].get('emailAddress',
|
||||
f_file['lastModifyingUser'].get('displayName', UNKNOWN))
|
||||
userLastModification['fileEntryInfo'] = f_file.copy()
|
||||
|
||||
def _getLastModificationPath(drive, userLastModification, pathDelimiter):
|
||||
if userLastModification['fileEntryInfo']:
|
||||
filePathInfo = initFilePathInfo(pathDelimiter)
|
||||
_, paths, _ = getFilePaths(drive, {}, userLastModification['fileEntryInfo'], filePathInfo)
|
||||
userLastModification['lastModifiedFilePath'] = paths[0] if paths else UNKNOWN
|
||||
|
||||
def _showLastModification(lastModification):
|
||||
printKeyValueList(['lastModifiedFileId', lastModification['lastModifiedFileId']])
|
||||
printKeyValueList(['lastModifiedFileName', lastModification['lastModifiedFileName']])
|
||||
printKeyValueList(['lastModifiedFileMimeType', lastModification['lastModifiedFileMimeType']])
|
||||
printKeyValueList(['lastModifiedFilePath', lastModification['lastModifiedFilePath']])
|
||||
printKeyValueList(['lastModifyingUser', lastModification['lastModifyingUser']])
|
||||
printKeyValueList(['lastModifiedTime', formatLocalTime(lastModification['lastModifiedTime'])])
|
||||
|
||||
def _updateLastModificationRow(row, lastModification):
|
||||
row.update({'lastModifiedFileId': lastModification['lastModifiedFileId'],
|
||||
'lastModifiedFileName': lastModification['lastModifiedFileName'],
|
||||
'lastModifiedFileMimeType': lastModification['lastModifiedFileMimeType'],
|
||||
'lastModifiedFilePath': lastModification['lastModifiedFilePath'],
|
||||
'lastModifyingUser': lastModification['lastModifyingUser'],
|
||||
'lastModifiedTime': formatLocalTime(lastModification['lastModifiedTime'])})
|
||||
|
||||
# gam <UserTypeEntity> print filecounts [todrive <ToDriveAttribute>*]
|
||||
# [((query <QueryDriveFile>) | (fullquery <QueryDriveFile>) | <DriveFileQueryShortcut>) (querytime<String> <Time>)*]
|
||||
# [continueoninvalidquery [<Boolean>]]
|
||||
@@ -56485,7 +56536,8 @@ def printFileParentTree(users):
|
||||
# [filenamematchpattern <REMatchPattern>]
|
||||
# <PermissionMatch>* [<PermissionMatchMode>] [<PermissionMatchAction>]
|
||||
# [excludetrashed] (addcsvdata <FieldName> <String>)*
|
||||
# [showsize] [showmimetypesize] [showlastmodification]
|
||||
# [showsize] [showmimetypesize]
|
||||
# [showlastmodification] [pathdelimiter <Character>]
|
||||
# (addcsvdata <FieldName> <String>)*
|
||||
# [summary none|only|plus] [summaryuser <String>]
|
||||
# gam <UserTypeEntity> show filecounts
|
||||
@@ -56499,7 +56551,8 @@ def printFileParentTree(users):
|
||||
# [filenamematchpattern <REMatchPattern>]
|
||||
# <PermissionMatch>* [<PermissionMatchMode>] [<PermissionMatchAction>]
|
||||
# [excludetrashed]
|
||||
# [showsize] [showmimetypesize] [showlastmodification]
|
||||
# [showsize] [showmimetypesize]
|
||||
# [showlastmodification] [pathdelimiter <Character>]
|
||||
# [summary none|only|plus] [summaryuser <String>]
|
||||
def printShowFileCounts(users):
|
||||
def _setSelectionFields():
|
||||
@@ -56508,7 +56561,7 @@ def printShowFileCounts(users):
|
||||
if showSize or (DLP.minimumFileSize is not None) or (DLP.maximumFileSize is not None):
|
||||
fieldsList.append(sizeField)
|
||||
if showLastModification:
|
||||
fieldsList.extend(['id,name,modifiedTime,lastModifyingUser(me, displayName, emailAddress)'])
|
||||
fieldsList.extend(['id,name,modifiedTime,lastModifyingUser(me, displayName, emailAddress),parents'])
|
||||
if DLP.filenameMatchPattern:
|
||||
fieldsList.append('name')
|
||||
if DLP.excludeTrashed:
|
||||
@@ -56544,9 +56597,7 @@ def printShowFileCounts(users):
|
||||
printEntityKVList(kvList, dataList, i, count)
|
||||
Ind.Increment()
|
||||
if showLastModification:
|
||||
printKeyValueList(['lastModifiedFile', f"{lastModification['lastModifiedFileName']}({lastModification['lastModifiedFileId']})",
|
||||
'lastModifyingUser', lastModification['lastModifyingUser'],
|
||||
'lastModifiedTime', formatLocalTime(lastModification['lastModifiedTime'])])
|
||||
_showLastModification(lastModification)
|
||||
for mimeType, mtinfo in sorted(iter(mimeTypeInfo.items())):
|
||||
if not showMimeTypeSize:
|
||||
printKeyValueList([mimeType, mtinfo['count']])
|
||||
@@ -56561,10 +56612,7 @@ def printShowFileCounts(users):
|
||||
if showSize:
|
||||
row['Size'] = sizeTotal
|
||||
if showLastModification:
|
||||
row.update({'lastModifiedFileId': lastModification['lastModifiedFileId'],
|
||||
'lastModifiedFileName': lastModification['lastModifiedFileName'],
|
||||
'lastModifyingUser': lastModification['lastModifyingUser'],
|
||||
'lastModifiedTime': formatLocalTime(lastModification['lastModifiedTime'])})
|
||||
_updateLastModificationRow(row, lastModification)
|
||||
if addCSVData:
|
||||
row.update(addCSVData)
|
||||
for mimeType, mtinfo in sorted(iter(mimeTypeInfo.items())):
|
||||
@@ -56578,6 +56626,7 @@ def printShowFileCounts(users):
|
||||
csvPF.SetZeroBlankMimeTypeCounts(True)
|
||||
fieldsList = ['mimeType']
|
||||
DLP = DriveListParameters({'allowChoose': False, 'allowCorpora': True, 'allowQuery': True, 'mimeTypeInQuery': True})
|
||||
pathDelimiter = '/'
|
||||
sharedDriveId = sharedDriveName = ''
|
||||
continueOnInvalidQuery = showSize = showLastModification = showMimeTypeSize = False
|
||||
sizeField = 'quotaBytesUsed'
|
||||
@@ -56586,9 +56635,7 @@ def printShowFileCounts(users):
|
||||
summaryMimeTypeInfo = {}
|
||||
fileIdEntity = {}
|
||||
addCSVData = {}
|
||||
summaryLastModification = {
|
||||
'lastModifiedFileId': '', 'lastModifiedFileName': '',
|
||||
'lastModifyingUser': '', 'lastModifiedTime': NEVER_TIME}
|
||||
summaryLastModification = _initLastModification()
|
||||
while Cmd.ArgumentsRemaining():
|
||||
myarg = getArgument()
|
||||
if csvPF and myarg == 'todrive':
|
||||
@@ -56611,6 +56658,8 @@ def printShowFileCounts(users):
|
||||
summary = getChoice(FILECOUNT_SUMMARY_CHOICE_MAP, mapChoice=True)
|
||||
elif myarg == 'summaryuser':
|
||||
summaryUser = getString(Cmd.OB_STRING)
|
||||
elif myarg == 'pathdelimiter':
|
||||
pathDelimiter = getCharacter()
|
||||
elif csvPF and myarg == 'addcsvdata':
|
||||
k = getString(Cmd.OB_STRING)
|
||||
addCSVData[k] = getString(Cmd.OB_STRING, minLen=0)
|
||||
@@ -56637,7 +56686,9 @@ def printShowFileCounts(users):
|
||||
if showSize:
|
||||
sortTitles.insert(sortTitles.index('Total')+1, 'Size')
|
||||
if showLastModification:
|
||||
sortTitles.extend(['lastModifiedFileId', 'lastModifiedFileName', 'lastModifyingUser', 'lastModifiedTime'])
|
||||
sortTitles.extend(['lastModifiedFileId', 'lastModifiedFileName',
|
||||
'lastModifiedFileMimeType', 'lastModifiedFilePath',
|
||||
'lastModifyingUser', 'lastModifiedTime'])
|
||||
if addCSVData:
|
||||
sortTitles.extend(sorted(addCSVData.keys()))
|
||||
csvPF.SetTitles(sortTitles)
|
||||
@@ -56652,9 +56703,7 @@ def printShowFileCounts(users):
|
||||
sharedDriveId = fileIdEntity.get('shareddrive', {}).get('driveId', '')
|
||||
sharedDriveName = _getSharedDriveNameFromId(sharedDriveId) if sharedDriveId else ''
|
||||
mimeTypeInfo = {}
|
||||
userLastModification = {
|
||||
'lastModifiedFileId': '', 'lastModifiedFileName': '',
|
||||
'lastModifyingUser': '', 'lastModifiedTime': NEVER_TIME}
|
||||
userLastModification = _initLastModification()
|
||||
gettingEntity = _getGettingEntity(user, fileIdEntity)
|
||||
printGettingAllEntityItemsForWhom(Ent.DRIVE_FILE_OR_FOLDER, gettingEntity, i, count, query=DLP.fileIdEntity['query'])
|
||||
try:
|
||||
@@ -56666,7 +56715,7 @@ def printShowFileCounts(users):
|
||||
retryReasons=[GAPI.UNKNOWN_ERROR],
|
||||
q=DLP.fileIdEntity['query'],
|
||||
fields=pagesFields, pageSize=GC.Values[GC.DRIVE_MAX_RESULTS], **btkwargs)
|
||||
for files in feed:
|
||||
for files in feed:
|
||||
for f_file in files:
|
||||
driveId = f_file.get('driveId')
|
||||
checkSharedDrivePermissions = getPermissionsForSharedDrives and driveId and 'permissions' not in f_file
|
||||
@@ -56697,12 +56746,8 @@ def printShowFileCounts(users):
|
||||
mimeTypeInfo[f_file['mimeType']]['count'] += 1
|
||||
mimeTypeInfo[f_file['mimeType']]['size'] += int(f_file.get(sizeField, '0'))
|
||||
if showLastModification:
|
||||
if f_file.get('modifiedTime', NEVER_TIME) > userLastModification['lastModifiedTime'] and 'lastModifyingUser' in f_file:
|
||||
userLastModification['lastModifiedFileId'] = f_file['id']
|
||||
userLastModification['lastModifiedFileName'] = _stripControlCharsFromName(f_file['name'])
|
||||
userLastModification['lastModifiedTime'] = f_file['modifiedTime']
|
||||
userLastModification['lastModifyingUser'] = f_file['lastModifyingUser'].get('emailAddress',
|
||||
f_file['lastModifyingUser'].get('displayName', UNKNOWN))
|
||||
_checkUpdateLastModifiction(f_file, userLastModification)
|
||||
_getLastModificationPath(drive, userLastModification, pathDelimiter)
|
||||
showMimeTypeInfo(user, mimeTypeInfo, sharedDriveId, sharedDriveName, userLastModification, i, count)
|
||||
if showLastModification and userLastModification['lastModifiedTime'] > summaryLastModification['lastModifiedTime']:
|
||||
summaryLastModification = userLastModification.copy()
|
||||
@@ -56726,6 +56771,110 @@ def printShowFileCounts(users):
|
||||
if csvPF:
|
||||
csvPF.writeCSVfile('Drive File Counts')
|
||||
|
||||
# gam <UserTypeEntity> print drivelastmodification [todrive <ToDriveAttribute>*]
|
||||
# [select <SharedDriveEntity>]
|
||||
# [pathdelimiter <Character>]
|
||||
# (addcsvdata <FieldName> <String>)*
|
||||
# gam <UserTypeEntity> show drivelastmodification
|
||||
# [select <SharedDriveEntity>]
|
||||
# [pathdelimiter <Character>]
|
||||
def printShowDrivelastModifications(users):
|
||||
def showLastModificationInfo(user, sharedDriveId, sharedDriveName, lastModification, i, count):
|
||||
if not csvPF:
|
||||
if sharedDriveId:
|
||||
kvList = [Ent.USER, user, Ent.SHAREDDRIVE, f'{sharedDriveName} ({sharedDriveId})']
|
||||
else:
|
||||
kvList = [Ent.USER, user]
|
||||
printEntity(kvList, i, count)
|
||||
Ind.Increment()
|
||||
_showLastModification(lastModification)
|
||||
Ind.Decrement()
|
||||
else:
|
||||
if sharedDriveId:
|
||||
row = {'User': user, 'id': sharedDriveId, 'name': sharedDriveName}
|
||||
else:
|
||||
row = {'User': user}
|
||||
_updateLastModificationRow(row, lastModification)
|
||||
if addCSVData:
|
||||
row.update(addCSVData)
|
||||
csvPF.WriteRowTitles(row)
|
||||
|
||||
csvPF = CSVPrintFile() if Act.csvFormat() else None
|
||||
fieldsList = ['id', 'driveId', 'name', 'mimeType', 'lastModifyingUser', 'modifiedTime', 'parents']
|
||||
DLP = DriveListParameters({'allowChoose': False, 'allowCorpora': False, 'allowQuery': False, 'mimeTypeInQuery': True})
|
||||
pathDelimiter = '/'
|
||||
sharedDriveId = sharedDriveName = ''
|
||||
fileIdEntity = {}
|
||||
addCSVData = {}
|
||||
while Cmd.ArgumentsRemaining():
|
||||
myarg = getArgument()
|
||||
if csvPF and myarg == 'todrive':
|
||||
csvPF.GetTodriveParameters()
|
||||
elif myarg == 'select':
|
||||
if fileIdEntity:
|
||||
usageErrorExit(Msg.CAN_NOT_BE_SPECIFIED_MORE_THAN_ONCE.format('select'))
|
||||
fileIdEntity = getSharedDriveEntity()
|
||||
elif myarg == 'pathdelimiter':
|
||||
pathDelimiter = getCharacter()
|
||||
elif csvPF and myarg == 'addcsvdata':
|
||||
k = getString(Cmd.OB_STRING)
|
||||
addCSVData[k] = getString(Cmd.OB_STRING, minLen=0)
|
||||
else:
|
||||
unknownArgumentExit()
|
||||
if not fileIdEntity:
|
||||
fileIdEntity = DLP.GetFileIdEntity()
|
||||
if not fileIdEntity.get('shareddrive'):
|
||||
btkwargs = DLP.kwargs
|
||||
else:
|
||||
btkwargs = fileIdEntity['shareddrive']
|
||||
fieldsList.append('driveId')
|
||||
DLP.Finalize(fileIdEntity)
|
||||
if csvPF:
|
||||
sortTitles = ['User', 'id', 'name'] if fileIdEntity.get('shareddrive') else ['User']
|
||||
sortTitles.extend(['lastModifiedFileId', 'lastModifiedFileName',
|
||||
'lastModifiedFileMimeType', 'lastModifiedFilePath',
|
||||
'lastModifyingUser', 'lastModifiedTime'])
|
||||
if addCSVData:
|
||||
sortTitles.extend(sorted(addCSVData.keys()))
|
||||
csvPF.SetTitles(sortTitles)
|
||||
csvPF.SetSortAllTitles()
|
||||
pagesFields = getItemFieldsFromFieldsList('files', fieldsList)
|
||||
i, count, users = getEntityArgument(users)
|
||||
for user in users:
|
||||
i += 1
|
||||
user, drive = _validateUserSharedDrive(user, i, count, fileIdEntity)
|
||||
if not drive:
|
||||
continue
|
||||
sharedDriveId = fileIdEntity.get('shareddrive', {}).get('driveId', '')
|
||||
sharedDriveName = _getSharedDriveNameFromId(sharedDriveId) if sharedDriveId else ''
|
||||
userLastModification = _initLastModification()
|
||||
gettingEntity = _getGettingEntity(user, fileIdEntity)
|
||||
printGettingAllEntityItemsForWhom(Ent.DRIVE_FILE_OR_FOLDER, gettingEntity, i, count)
|
||||
try:
|
||||
feed = yieldGAPIpages(drive.files(), 'list', 'files',
|
||||
pageMessage=getPageMessageForWhom(),
|
||||
throwReasons=GAPI.DRIVE_USER_THROW_REASONS+[GAPI.INVALID, GAPI.BAD_REQUEST, GAPI.FILE_NOT_FOUND,
|
||||
GAPI.NOT_FOUND, GAPI.TEAMDRIVE_MEMBERSHIP_REQUIRED],
|
||||
retryReasons=[GAPI.UNKNOWN_ERROR],
|
||||
fields=pagesFields, pageSize=GC.Values[GC.DRIVE_MAX_RESULTS], **btkwargs)
|
||||
for files in feed:
|
||||
for f_file in files:
|
||||
_checkUpdateLastModifiction(f_file, userLastModification)
|
||||
_getLastModificationPath(drive, userLastModification, pathDelimiter)
|
||||
showLastModificationInfo(user, sharedDriveId, sharedDriveName, userLastModification, i, count)
|
||||
except (GAPI.invalid, GAPI.badRequest) as e:
|
||||
entityActionFailedWarning([Ent.USER, user, Ent.DRIVE_FILE_OR_FOLDER, None], str(e), i, count)
|
||||
continue
|
||||
except GAPI.fileNotFound:
|
||||
printGotEntityItemsForWhom(0)
|
||||
except (GAPI.notFound, GAPI.teamDriveMembershipRequired) as e:
|
||||
entityActionFailedWarning([Ent.USER, user, Ent.SHAREDDRIVE_ID, sharedDriveId], str(e), i, count)
|
||||
except (GAPI.serviceNotAvailable, GAPI.authError, GAPI.domainPolicy) as e:
|
||||
userDriveServiceNotEnabledWarning(user, str(e), i, count)
|
||||
continue
|
||||
if csvPF:
|
||||
csvPF.writeCSVfile('Drive File Last Modification')
|
||||
|
||||
DISKUSAGE_SHOW_CHOICES = {'all', 'summary', 'summaryandtrash'}
|
||||
|
||||
# gam <UserTypeEntity> print diskusage <DriveFileEntity> [todrive <ToDriveAttribute>*]
|
||||
@@ -76543,6 +76692,7 @@ USER_COMMANDS_WITH_OBJECTS = {
|
||||
Cmd.ARG_DRIVEFILEACL: printShowDriveFileACLs,
|
||||
Cmd.ARG_DRIVELABEL: printShowDriveLabels,
|
||||
Cmd.ARG_DRIVELABELPERMISSION: printShowDriveLabelPermissions,
|
||||
Cmd.ARG_DRIVELASTMODIFICATION: printShowDrivelastModifications,
|
||||
Cmd.ARG_DRIVESETTINGS: printShowDriveSettings,
|
||||
Cmd.ARG_EMPTYDRIVEFOLDERS: printEmptyDriveFolders,
|
||||
Cmd.ARG_EVENT: printShowCalendarEvents,
|
||||
@@ -76650,6 +76800,7 @@ USER_COMMANDS_WITH_OBJECTS = {
|
||||
Cmd.ARG_DRIVEFILEACL: printShowDriveFileACLs,
|
||||
Cmd.ARG_DRIVELABEL: printShowDriveLabels,
|
||||
Cmd.ARG_DRIVELABELPERMISSION: printShowDriveLabelPermissions,
|
||||
Cmd.ARG_DRIVELASTMODIFICATION: printShowDrivelastModifications,
|
||||
Cmd.ARG_DRIVESETTINGS: printShowDriveSettings,
|
||||
Cmd.ARG_EVENT: printShowCalendarEvents,
|
||||
Cmd.ARG_FILECOMMENT: printShowFileComments,
|
||||
@@ -76874,13 +77025,14 @@ USER_COMMANDS_OBJ_ALIASES = {
|
||||
Cmd.ARG_DOMAINCONTACT: Cmd.ARG_PEOPLECONTACT,
|
||||
Cmd.ARG_DOMAINCONTACTS: Cmd.ARG_PEOPLECONTACT,
|
||||
Cmd.ARG_DRIVEFILEACLS: Cmd.ARG_DRIVEFILEACL,
|
||||
Cmd.ARG_FILEDRIVELABELS: Cmd.ARG_FILEDRIVELABEL,
|
||||
Cmd.ARG_DRIVEFILESHORTCUTS: Cmd.ARG_DRIVEFILESHORTCUT,
|
||||
Cmd.ARG_DRIVELABELS: Cmd.ARG_DRIVELABEL,
|
||||
Cmd.ARG_DRIVELABELPERMISSIONS: Cmd.ARG_DRIVELABELPERMISSION,
|
||||
Cmd.ARG_DRIVELASTMODIFICATIONS: Cmd.ARG_DRIVELASTMODIFICATION,
|
||||
Cmd.ARG_EVENTS: Cmd.ARG_EVENT,
|
||||
Cmd.ARG_FILECOMMENTS: Cmd.ARG_FILECOMMENT,
|
||||
Cmd.ARG_FILECOUNTS: Cmd.ARG_FILECOUNT,
|
||||
Cmd.ARG_FILEDRIVELABELS: Cmd.ARG_FILEDRIVELABEL,
|
||||
Cmd.ARG_FILEPATHS: Cmd.ARG_FILEPATH,
|
||||
Cmd.ARG_FILEREVISIONS: Cmd.ARG_FILEREVISION,
|
||||
Cmd.ARG_FILESHARECOUNTS: Cmd.ARG_FILESHARECOUNT,
|
||||
|
||||
@@ -579,6 +579,8 @@ class GamCLArgs():
|
||||
ARG_DRIVELABELS = 'drivelabels'
|
||||
ARG_DRIVELABELPERMISSION = 'drivelabelpermission'
|
||||
ARG_DRIVELABELPERMISSIONS = 'drivelabelpermissions'
|
||||
ARG_DRIVELASTMODIFICATION = 'drivelastmodification'
|
||||
ARG_DRIVELASTMODIFICATIONS = 'drivelastmodifications'
|
||||
ARG_DRIVESETTINGS = 'drivesettings'
|
||||
ARG_DRIVETRASH = 'drivetrash'
|
||||
ARG_EMPTYDRIVEFOLDERS = 'emptydrivefolders'
|
||||
|
||||
@@ -2,13 +2,13 @@ chardet
|
||||
cryptography
|
||||
distro; sys_platform=='linux'
|
||||
filelock
|
||||
google-api-python-client>=2.1
|
||||
google-auth-httplib2
|
||||
google-auth-oauthlib>=0.4.1
|
||||
google-auth>=2.3.2
|
||||
httplib2>=0.17.0
|
||||
google-api-python-client>=2.166.0
|
||||
google-auth-httplib2>=0.2.0
|
||||
google-auth-oauthlib>=1.2.1
|
||||
google-auth>=2.38.0
|
||||
httplib2>=0.22.0
|
||||
lxml
|
||||
passlib>=1.7.2
|
||||
passlib>=1.7.4
|
||||
pathvalidate
|
||||
python-dateutil
|
||||
yubikey-manager[yubikey]>=5.0
|
||||
yubikey-manager[yubikey]>=5.6.1
|
||||
|
||||
@@ -725,6 +725,13 @@ chrome.devices.DevicePostQuantumKeyAgreementEnabled: Post-quantum TLS.
|
||||
FALSE: Do not allow post-quantum key agreement in TLS connections.
|
||||
TRUE: Allow post-quantum key agreement in TLS connections.
|
||||
|
||||
chrome.devices.DevicePowerBatteryChargingOptimization: Battery charging optimization.
|
||||
devicePowerBatteryChargingOptimization: TYPE_ENUM
|
||||
UNSET: Allow the user to decide.
|
||||
STANDARD: Enforce standard charging.
|
||||
ADAPTIVE: Enforce adaptive charging.
|
||||
LIMITED: Enforce limited charging.
|
||||
|
||||
chrome.devices.DevicePowerwashAllowed: Powerwash.
|
||||
devicePowerwashAllowed: TYPE_BOOL
|
||||
true: Allow powerwash to be triggered.
|
||||
@@ -1694,6 +1701,11 @@ chrome.devices.managedguest.DataUrlInSvgUseEnabled: Data URL support for SVGUseE
|
||||
true: Enable Data URL support in SVGUseElement.
|
||||
false: Disable Data URL support in SVGUseElement.
|
||||
|
||||
chrome.devices.managedguest.DataUrlWhitespacePreservationEnabled: Data URL whitespace preservation for all media types.
|
||||
dataUrlWhitespacePreservationEnabled: TYPE_BOOL
|
||||
true: Keep whitespace for all mime-types.
|
||||
false: Only keep whitespace for text and xml mime-types.
|
||||
|
||||
chrome.devices.managedguest.DefaultInsecureContentSetting: Control use of insecure content exceptions.
|
||||
defaultInsecureContentSetting: TYPE_ENUM
|
||||
BLOCK_INSECURE_CONTENT: Do not allow any site to load blockable mixed content.
|
||||
@@ -1995,14 +2007,14 @@ chrome.devices.managedguest.GenAiVcBackgroundSettings: Video conference backgrou
|
||||
ALLOWED: Allow Generative AI VC background and improve AI models.
|
||||
ALLOWED_WITHOUT_LOGGING: Allow Generative AI VC background without improving AI models.
|
||||
DISABLED: Do not allow Generative AI VC background.
|
||||
UNSET: Use the default Chrome behavior.
|
||||
UNSET: Use the value specified in the Generative AI policy defaults setting.
|
||||
|
||||
chrome.devices.managedguest.GenAiWallpaperSettings: Wallpaper settings.
|
||||
genAiWallpaperSettings: TYPE_ENUM
|
||||
ALLOWED: Allow Generative AI wallpaper and improve AI models.
|
||||
ALLOWED_WITHOUT_LOGGING: Allow Generative AI wallpaper without improving AI models.
|
||||
DISABLED: Do not allow Generative AI wallpaper.
|
||||
UNSET: Use the default Chrome behavior.
|
||||
UNSET: Use the value specified in the Generative AI policy defaults setting.
|
||||
|
||||
chrome.devices.managedguest.GloballyScopeHttpAuthCacheEnabled: Globally scoped HTTP authentication cache.
|
||||
globallyScopeHttpAuthCacheEnabled: TYPE_BOOL
|
||||
@@ -2304,6 +2316,10 @@ chrome.devices.managedguest.MonoAudioEnabled: Mono audio.
|
||||
FALSE: Disable mono audio.
|
||||
TRUE: Enable mono audio.
|
||||
|
||||
chrome.devices.managedguest.MultiScreenCaptureAllowedForUrls: URLs allowed for multi-screen capture .
|
||||
multiScreenCaptureAllowedForUrls: TYPE_LIST
|
||||
URLs allowed for multi-screen capture . The getAllScreensMedia API allows isolated web applications to capture multiple surfaces at once without additional user permission.
|
||||
|
||||
chrome.devices.managedguest.MutationEventsEnabled: Mutation Events.
|
||||
mutationEventsEnabled: TYPE_BOOL
|
||||
true: Temporarily re-enable mutation events.
|
||||
@@ -2708,6 +2724,9 @@ chrome.devices.managedguest.SearchSuggest: Search suggest.
|
||||
UNSET: Allow the user to decide.
|
||||
FALSE: Never allow users to use Search Suggest.
|
||||
TRUE: Always allow users to use Search Suggest.
|
||||
searchSuggestPolicyMode: TYPE_ENUM
|
||||
MANDATORY: Do not allow users to override.
|
||||
RECOMMENDED: Allow users to override.
|
||||
|
||||
chrome.devices.managedguest.SecurityTokenSessionSettings: Security token removal.
|
||||
securityTokenSessionBehavior: TYPE_ENUM
|
||||
@@ -2941,6 +2960,8 @@ chrome.devices.managedguest.SystemShortcutBehavior: Override system shortcuts.
|
||||
DEFAULT: Do not override system shortcuts.
|
||||
SHOULD_IGNORE_COMMON_VDI_SHORTCUTS: Override some system shortcuts.
|
||||
SHOULD_IGNORE_COMMON_VDI_SHORTCUTS_FULLSCREEN_ONLY: Override some system shortcuts while in fullscreen.
|
||||
ALLOW_PASSTHROUGH_OF_SEARCH_BASED_SHORTCUTS: Prioritize active app over OS for Search key shortcuts.
|
||||
ALLOW_PASSTHROUGH_OF_SEARCH_BASED_SHORTCUTS_FULLSCREEN_ONLY: Prioritize active app over OS for Search key shortcuts while in fullscreen.
|
||||
|
||||
chrome.devices.managedguest.TabDiscardingExceptions: Exceptions to tab discarding.
|
||||
tabDiscardingExceptions: TYPE_LIST
|
||||
@@ -3001,7 +3022,7 @@ chrome.devices.managedguest.UnthrottledNestedTimeoutEnabled: JavaScript setTimeo
|
||||
|
||||
chrome.devices.managedguest.UrlBlocking: URL blocking.
|
||||
urlBlocklist: TYPE_LIST
|
||||
Blocked URLs. Any URL in this list will be blocked, unless it also appears in the list of exceptions specified in 'urlAllowlist'. Maximum of 1000 URLs. Note: to block OS and browser settings set the 'chrome.users.SystemFeaturesDisableList' policy instead of blocking 'chrome://' URLs.
|
||||
Blocked URLs. Any URL in this list will be blocked, unless it also appears in the list of exceptions specified in 'urlAllowlist'. Maximum of 1000 URLs.
|
||||
urlAllowlist: TYPE_LIST
|
||||
Blocked URL exceptions. Any URL that matches an entry in this exception list will be allowed, even if it matches an entry in the blocked URLs. Wildcards ("*") are allowed when appended to a URL, but cannot be entered alone. Maximum of 1000 URLs. .
|
||||
chromeInternalUrlsBlocked: TYPE_BOOL
|
||||
@@ -3920,7 +3941,7 @@ chrome.users.appsconfig.ChromeWebStorePagesAndContent: Pages & content.
|
||||
false: Use default Web Store pages and content.
|
||||
cwsPagesContentDiscoverPageEnabled: TYPE_BOOL
|
||||
true: Show Discover page.
|
||||
false: Hide Discover page (recommended).
|
||||
false: Hide Discover page.
|
||||
cwsPagesContentEnabledPreviews: TYPE_LIST
|
||||
{'value': 'recommended', 'description': 'Show the recommended extensions preview.'}
|
||||
cwsPagesContentCategories: TYPE_LIST
|
||||
@@ -4492,7 +4513,7 @@ chrome.users.CreateThemesSettings: Create themes with AI.
|
||||
ALLOWED: Allow create themes and improve AI models.
|
||||
ALLOWED_WITHOUT_LOGGING: Allow create themes without improving AI models.
|
||||
DISABLED: Do not allow create themes.
|
||||
UNSET: Use the default Chrome behavior.
|
||||
UNSET: Use the value specified in the Generative AI policy defaults setting.
|
||||
|
||||
chrome.users.CredentialProviderPromoEnabled: Credential provider extension promo.
|
||||
credentialProviderPromoEnabled: TYPE_BOOL
|
||||
@@ -4520,6 +4541,9 @@ chrome.users.CursorHighlightEnabled: Cursor highlight.
|
||||
FALSE: Disable cursor highlight.
|
||||
TRUE: Enable cursor highlight.
|
||||
|
||||
chrome.users.CustomTermsOfService: Custom terms of service.
|
||||
downloadUri: TYPE_STRING
|
||||
|
||||
chrome.users.DataCompressionProxy: Data compression proxy.
|
||||
dataCompressionProxyEnabled: TYPE_ENUM
|
||||
UNSET: Allow the user to decide.
|
||||
@@ -4536,6 +4560,11 @@ chrome.users.DataUrlInSvgUseEnabled: Data URL support for SVGUseElement.
|
||||
true: Enable Data URL support in SVGUseElement.
|
||||
false: Disable Data URL support in SVGUseElement.
|
||||
|
||||
chrome.users.DataUrlWhitespacePreservationEnabled: Data URL whitespace preservation for all media types.
|
||||
dataUrlWhitespacePreservationEnabled: TYPE_BOOL
|
||||
true: Keep whitespace for all mime-types.
|
||||
false: Only keep whitespace for text and xml mime-types.
|
||||
|
||||
chrome.users.DefaultBrowserSettingEnabled: Default browser check.
|
||||
defaultBrowserSettingEnabled: TYPE_ENUM
|
||||
UNSET: Allow the user to decide.
|
||||
@@ -4638,7 +4667,7 @@ chrome.users.DevToolsGenAiSettings: DevTools AI features.
|
||||
ALLOWED: Allow DevTools Generative AI features and improve AI models.
|
||||
ALLOWED_WITHOUT_LOGGING: Allow DevTools Generative AI features without improving AI models.
|
||||
DISABLED: Do not allow DevTools Generative AI features.
|
||||
UNSET: Use the default Chrome behavior.
|
||||
UNSET: Use the value specified in the Generative AI policy defaults setting.
|
||||
|
||||
chrome.users.DictationEnabled: Dictation.
|
||||
dictationEnabled: TYPE_ENUM
|
||||
@@ -4981,14 +5010,14 @@ chrome.users.GenAiVcBackgroundSettings: Video conference background settings.
|
||||
ALLOWED: Allow Generative AI VC background and improve AI models.
|
||||
ALLOWED_WITHOUT_LOGGING: Allow Generative AI VC background without improving AI models.
|
||||
DISABLED: Do not allow Generative AI VC background.
|
||||
UNSET: Use the default Chrome behavior.
|
||||
UNSET: Use the value specified in the Generative AI policy defaults setting.
|
||||
|
||||
chrome.users.GenAiWallpaperSettings: Wallpaper settings.
|
||||
genAiWallpaperSettings: TYPE_ENUM
|
||||
ALLOWED: Allow Generative AI wallpaper and improve AI models.
|
||||
ALLOWED_WITHOUT_LOGGING: Allow Generative AI wallpaper without improving AI models.
|
||||
DISABLED: Do not allow Generative AI wallpaper.
|
||||
UNSET: Use the default Chrome behavior.
|
||||
UNSET: Use the value specified in the Generative AI policy defaults setting.
|
||||
|
||||
chrome.users.Geolocation: Geolocation.
|
||||
defaultGeolocationSetting: TYPE_ENUM
|
||||
@@ -5043,14 +5072,14 @@ chrome.users.HelpMeReadSettings: Help me read.
|
||||
ALLOWED: Allow help me read and improve AI models.
|
||||
ALLOWED_WITHOUT_LOGGING: Allow help me read without improving AI models.
|
||||
DISABLED: Do not allow help me read.
|
||||
UNSET: Use the default Chrome behavior.
|
||||
UNSET: Use the value specified in the Generative AI policy defaults setting.
|
||||
|
||||
chrome.users.HelpMeWriteSettings: Help me write.
|
||||
helpMeWriteSettings: TYPE_ENUM
|
||||
ALLOWED: Allow help me write and improve AI models.
|
||||
ALLOWED_WITHOUT_LOGGING: Allow help me write without improving AI models.
|
||||
DISABLED: Do not allow help me write.
|
||||
UNSET: Use the default Chrome behavior.
|
||||
UNSET: Use the value specified in the Generative AI policy defaults setting.
|
||||
|
||||
chrome.users.HighContrastEnabled: High contrast.
|
||||
highContrastEnabled: TYPE_ENUM
|
||||
@@ -5069,7 +5098,7 @@ chrome.users.HistorySearchSettings: History search settings.
|
||||
ALLOWED: Allow AI history search and improve AI models.
|
||||
ALLOWED_WITHOUT_LOGGING: Allow AI history search without improving AI models.
|
||||
DISABLED: Do not allow AI history search.
|
||||
UNSET: Use the default Chrome behavior.
|
||||
UNSET: Use the value specified in the Generative AI policy defaults setting.
|
||||
|
||||
chrome.users.HomeAndEndKeysModifier: Control the shortcut used to trigger the Home/End "six pack" keys.
|
||||
homeAndEndKeysModifier: TYPE_ENUM
|
||||
@@ -5434,6 +5463,7 @@ chrome.users.LocalUserFilesAllowed: Local storage configuration.
|
||||
GOOGLE_DRIVE: Migrate existing local files to Google Drive.
|
||||
MICROSOFT_ONEDRIVE: Migrate existing local files to OneDrive.
|
||||
READ_ONLY: Keep existing local files in read-only mode.
|
||||
DELETE: Delete existing local files.
|
||||
|
||||
chrome.users.LockIconInAddressBarEnabled: Lock icon in the omnibox for secure connections.
|
||||
lockIconInAddressBarEnabled: TYPE_BOOL
|
||||
@@ -5551,6 +5581,10 @@ chrome.users.MultipleSignInAccess: Multiple sign-in access.
|
||||
UNRESTRICTED: Unrestricted user access (allow any user to be added to any other user's session).
|
||||
NOT_ALLOWED: Block multiple sign-in access for users in this organization.
|
||||
|
||||
chrome.users.MultiScreenCaptureAllowedForUrls: URLs allowed for multi-screen capture .
|
||||
multiScreenCaptureAllowedForUrls: TYPE_LIST
|
||||
URLs allowed for multi-screen capture . The getAllScreensMedia API allows isolated web applications to capture multiple surfaces at once without additional user permission.
|
||||
|
||||
chrome.users.MutationEventsEnabled: Mutation Events.
|
||||
mutationEventsEnabled: TYPE_BOOL
|
||||
true: Temporarily re-enable mutation events.
|
||||
@@ -6325,6 +6359,9 @@ chrome.users.SearchSuggest: Search suggest.
|
||||
UNSET: Allow the user to decide.
|
||||
FALSE: Never allow users to use Search Suggest.
|
||||
TRUE: Always allow users to use Search Suggest.
|
||||
searchSuggestPolicyMode: TYPE_ENUM
|
||||
MANDATORY: Do not allow users to override.
|
||||
RECOMMENDED: Allow users to override.
|
||||
|
||||
chrome.users.SecondaryGoogleAccountSignin: Sign-in to secondary accounts.
|
||||
secondaryGoogleAccountSigninAllowed: TYPE_ENUM
|
||||
@@ -6683,6 +6720,8 @@ chrome.users.SystemShortcutBehavior: Override system shortcuts.
|
||||
DEFAULT: Do not override system shortcuts.
|
||||
SHOULD_IGNORE_COMMON_VDI_SHORTCUTS: Override some system shortcuts.
|
||||
SHOULD_IGNORE_COMMON_VDI_SHORTCUTS_FULLSCREEN_ONLY: Override some system shortcuts while in fullscreen.
|
||||
ALLOW_PASSTHROUGH_OF_SEARCH_BASED_SHORTCUTS: Prioritize active app over OS for Search key shortcuts.
|
||||
ALLOW_PASSTHROUGH_OF_SEARCH_BASED_SHORTCUTS_FULLSCREEN_ONLY: Prioritize active app over OS for Search key shortcuts while in fullscreen.
|
||||
|
||||
chrome.users.SystemTerminalSshAllowed: SSH in terminal system app.
|
||||
systemTerminalSshAllowed: TYPE_ENUM
|
||||
@@ -6695,7 +6734,7 @@ chrome.users.TabCompareSettings: Tab compare.
|
||||
ALLOWED: Allow tab compare and improve AI models.
|
||||
ALLOWED_WITHOUT_LOGGING: Allow tab compare without improving AI models.
|
||||
DISABLED: Do not allow tab compare.
|
||||
UNSET: Use the default Chrome behavior.
|
||||
UNSET: Use the value specified in the Generative AI policy defaults setting.
|
||||
|
||||
chrome.users.TabDiscardingExceptions: Exceptions to tab discarding.
|
||||
tabDiscardingExceptions: TYPE_LIST
|
||||
@@ -6706,7 +6745,7 @@ chrome.users.TabOrganizerSettings: Tab organizer.
|
||||
ALLOWED: Allow tab organizer and improve AI models.
|
||||
ALLOWED_WITHOUT_LOGGING: Allow tab organizer without improving AI models.
|
||||
DISABLED: Do not allow tab organizer.
|
||||
UNSET: Use the default Chrome behavior.
|
||||
UNSET: Use the value specified in the Generative AI policy defaults setting.
|
||||
|
||||
chrome.users.TargetBlankImpliesNoOpener: Pop-up interactions.
|
||||
targetBlankImpliesNoOpener: TYPE_BOOL
|
||||
@@ -6813,7 +6852,7 @@ chrome.users.UpdatesSuppressed: Suppress auto-update check.
|
||||
|
||||
chrome.users.UrlBlocking: URL blocking.
|
||||
urlBlocklist: TYPE_LIST
|
||||
Blocked URLs. Any URL in this list will be blocked, unless it also appears in the list of exceptions specified in 'urlAllowlist'. Maximum of 1000 URLs. Note: to block OS and browser settings set the 'chrome.users.SystemFeaturesDisableList' policy instead of blocking 'chrome://' URLs.
|
||||
Blocked URLs. Any URL in this list will be blocked, unless it also appears in the list of exceptions specified in 'urlAllowlist'. Maximum of 1000 URLs.
|
||||
urlAllowlist: TYPE_LIST
|
||||
Blocked URL exceptions. Any URL that matches an entry in this exception list will be allowed, even if it matches an entry in the blocked URLs. Wildcards ("*") are allowed when appended to a URL, but cannot be entered alone. Maximum of 1000 URLs. .
|
||||
chromeInternalUrlsBlocked: TYPE_BOOL
|
||||
|
||||
@@ -57,10 +57,10 @@ Typically, you will enclose the entire list in double quotes and quote each item
|
||||
* ```"item item item"```
|
||||
- Items, separated by commas, with spaces, commas or single quotes in the items themselves
|
||||
* ```"'it em','it,em',\"it'em\""``` - Linux, MacOS, Windows Command Prompt
|
||||
* ```"'it em','it,em',`"it'em`""``` - Windows Power Shell
|
||||
* ```"'it\ em','it,em',`"it\'em`""``` - Windows Power Shell
|
||||
- Items, separated by spaces, with spaces, commas or single quotes in the items themselves
|
||||
* ```"'it em' 'it,em' \"it'em\""``` - Linux, MacOS, Windows Command Prompt
|
||||
* ```"'it em' 'it,em' `"it'em`""``` - Windows Power Shell
|
||||
* ```"'it\ em' 'it,em' `"it\'em`""``` - Windows Power Shell
|
||||
|
||||
Typical places where these rules apply are lists of OUs and Contact Groups.
|
||||
|
||||
|
||||
@@ -10,6 +10,40 @@ 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.06.04
|
||||
|
||||
Fixed bug in `gam report <ActivityApplictionName>` where a report with no activities
|
||||
was not displaying any output.
|
||||
|
||||
### 7.06.03
|
||||
|
||||
Fixed bug in `gam <UserTypeEntity> print|show drivelastmodification` that caused a trap
|
||||
when an empty drive was specified.
|
||||
|
||||
### 7.06.02
|
||||
|
||||
Updated `gam <UserTypeEntity> print|show filecounts ... showlastmodification` to include
|
||||
file mimetype and path information for the last modified file.
|
||||
|
||||
Added simple commands to get information about the last modified file on a drive.
|
||||
By default, a user's My Drive is processed; optionally, a Shared Drive can be processed.
|
||||
```
|
||||
gam <UserTypeEntity> print drivelastmodification [todrive <ToDriveAttribute>*]
|
||||
[select <SharedDriveEntity>]
|
||||
[pathdelimiter <Character>]
|
||||
(addcsvdata <FieldName> <String>)*
|
||||
gam <UserTypeEntity> show drivelastmodification
|
||||
[select <SharedDriveEntity>]
|
||||
[pathdelimiter <Character>]
|
||||
```
|
||||
|
||||
### 7.06.01
|
||||
|
||||
Updated `gam <UserTypeEntity> create|update drivefileacl ... expiration <Time>`
|
||||
to handle additional API errors.
|
||||
|
||||
Updated to Python 3.13.3.
|
||||
|
||||
### 7.06.00
|
||||
|
||||
Upgraded to OpenSSL 3.5.0.
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
# Introduction
|
||||
GAM7 is a free, open source command line tool for Google Workspace Administrators to manage domain and user settings quickly and easily.
|
||||
|
||||
GAM7 is a rewrite/extension of Jay Lee's Legacy GAM, without his efforts, this version wouldn't exist.
|
||||
|
||||
# Requirements
|
||||
GAM7 requires paid, or Education/Non-profit, editions of Google Workspace. G Suite Legacy Free Edition has limited API support and not all GAM commands work.
|
||||
|
||||
@@ -35,4 +33,4 @@ The official GAM7 source repository is on [GitHub](https://github.com/GAM-team/G
|
||||
GAM is maintained by [Jay (James) Lee](mailto:jay0lee@gmail.com) and [Ross Scroggs](mailto:ross.scroggs@gmail.com). Please direct "how do I?" questions to [Google Groups].
|
||||
|
||||
|
||||
[Google Groups]: https://groups.google.com/group/google-apps-manager
|
||||
[Google Groups]: https://groups.google.com/group/google-apps-manager
|
||||
|
||||
@@ -251,9 +251,9 @@ writes the credentials into the file oauth2.txt.
|
||||
admin@server:/Users/admin$ rm -f /Users/admin/GAMConfig/oauth2.txt
|
||||
admin@server:/Users/admin$ gam version
|
||||
WARNING: Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: /Users/admin/GAMConfig/oauth2.txt, Not Found
|
||||
GAM 7.06.00 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM 7.06.04 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.2 64-bit final
|
||||
Python 3.13.3 64-bit final
|
||||
MacOS Sequoia 15.4 x86_64
|
||||
Path: /Users/admin/bin/gam7
|
||||
Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
|
||||
@@ -989,9 +989,9 @@ writes the credentials into the file oauth2.txt.
|
||||
C:\>del C:\GAMConfig\oauth2.txt
|
||||
C:\>gam version
|
||||
WARNING: Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\GAMConfig\oauth2.txt, Not Found
|
||||
GAM 7.06.00 - https://github.com/GAM-team/GAM - pythonsource
|
||||
GAM 7.06.04 - https://github.com/GAM-team/GAM - pythonsource
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.2 64-bit final
|
||||
Python 3.13.3 64-bit final
|
||||
Windows-10-10.0.17134 AMD64
|
||||
Path: C:\GAM7
|
||||
Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
- [Handle empty file lists](#handle-empty-file-lists)
|
||||
- [Display disk usage](#display-disk-usage)
|
||||
- [Display files published to the web](#display-files-published-to-the-web)
|
||||
- [Display information about last modified file on a drive](#display-information-about-last-modified-file-on-a-drive)
|
||||
|
||||
## API documentation
|
||||
* [Drive API - Files](https://developers.google.com/drive/api/v3/reference/files)
|
||||
@@ -704,7 +705,8 @@ gam <UserTypeEntity> print filecounts [todrive <ToDriveAttribute>*]
|
||||
[filenamematchpattern <REMatchPattern>]
|
||||
<PermissionMatch>* [<PermissionMatchMode>] [<PermissionMatchAction>]
|
||||
[excludetrashed]
|
||||
[showsize] [showmimetypesize] [showlastmodification]
|
||||
[showsize] [showmimetypesize]
|
||||
[showlastmodification] [pathdelimiter <Character>]
|
||||
(addcsvdata <FieldName> <String>)*
|
||||
[summary none|only|plus] [summaryuser <String>]
|
||||
gam <UserTypeEntity> show filecounts
|
||||
@@ -719,7 +721,8 @@ gam <UserTypeEntity> show filecounts
|
||||
[filenamematchpattern <REMatchPattern>]
|
||||
<PermissionMatch>* [<PermissionMatchMode>] [<PermissionMatchAction>]
|
||||
[excludetrashed]
|
||||
[showsize] [showmimetypesize] [showlastmodification]
|
||||
[showsize] [showmimetypesize]
|
||||
[showlastmodification] [pathdelimiter <Character>]
|
||||
[summary none|only|plus] [summaryuser <String>]
|
||||
```
|
||||
|
||||
@@ -736,7 +739,7 @@ The `showsize` option displays the total size (in bytes) of the files counted.
|
||||
The `showmimetypesize` option displays the total size (in bytes) of each MIME type counted.
|
||||
|
||||
The option `showlastmodification` displays the following fields:
|
||||
`lastModifiedFileId,lastModifiedFileName,lastModifyingUser,lastModifiedTime`;
|
||||
`lastModifiedFileId,lastModifiedFileName,lastModifiedFileMimeType,lastModifiedFilePath,lastModifyingUser,lastModifiedTime`;
|
||||
these are for the most recently modified file.
|
||||
|
||||
For print filecouts, add additional columns of data from the command line to the output:
|
||||
@@ -1748,3 +1751,24 @@ gam config csv_output_header_filter "Owner,id,revisions.0.published,revisions.0.
|
||||
# Get the files name, MIMEtype and path
|
||||
gam redirect csv ./PublishedDocsWithName.csv multiprocess redirect stderr - multiprocess csv ./PublishedDocs.csv gam user "~Owner" print filelist select "~id" fields id,name,mimetype fullpath addcsvdata published "~revisions.0.published" addcsvdata publishedOutsideDomain "~revisions.0.publishedOutsideDomain"
|
||||
```
|
||||
|
||||
## Display information about last modified file on a drive
|
||||
Use these commands to display information about the most recently modified file on a drive.
|
||||
|
||||
By default, a user's My Drive is processed; optionally, a Shared Drive can be processed.
|
||||
```
|
||||
gam <UserTypeEntity> print drivelastmodification [todrive <ToDriveAttribute>*]
|
||||
[select <SharedDriveEntity>]
|
||||
[pathdelimiter <Character>]
|
||||
(addcsvdata <FieldName> <String>)*
|
||||
gam <UserTypeEntity> show drivelastmodification
|
||||
[select <SharedDriveEntity>]
|
||||
[pathdelimiter <Character>]
|
||||
```
|
||||
In addition to the user and optional Shared Drive information, The following fields are displayed
|
||||
`lastModifiedFileId,lastModifiedFileName,lastModifiedFileMimeType,lastModifiedFilePath,lastModifyingUser,lastModifiedTime`
|
||||
|
||||
By default, file path components are separated by `/`; use `pathdelimiter <Character>` to use `<Character>` as the separator.
|
||||
|
||||
For print drivelastmodification, add additional columns of data from the command line to the output:
|
||||
* `addcsvdata <FieldName> <String>` - Add additional columns of data from the command line to the output
|
||||
|
||||
@@ -1161,10 +1161,10 @@ The `quotechar <Character>` option allows you to choose an alternate quote chara
|
||||
Print a CSV file with headers `domain,count` that gives the number of users in each domain
|
||||
### Print domain counts for users in a specific domain and/or selected by a query
|
||||
```
|
||||
gam print users [todrive <ToDriveAttribute>*]
|
||||
gam print users countonly [todrive <ToDriveAttribute>*]
|
||||
([domain|domains <DomainNameEntity>] [(query <QueryUser>)|(queries <QueryUserList>)]
|
||||
[limittoou <OrgUnitItem>] [deleted_only|only_deleted])
|
||||
[formatjson [quotechar <Character>]] [countonly]
|
||||
[formatjson [quotechar <Character>]]
|
||||
[issuspended <Boolean>]
|
||||
```
|
||||
By default, users in all domains in the account are selected; these options allow selection of subsets of users:
|
||||
@@ -1177,10 +1177,10 @@ By default, users in all domains in the account are selected; these options allo
|
||||
|
||||
### Print domain counts for users specified by `<UserTypeEntity>`
|
||||
```
|
||||
gam print users [todrive <ToDriveAttribute>*] select <UserTypeEntity>
|
||||
[formatjson [quotechar <Character>]] [countonly]
|
||||
gam <UserTypeEntity> print users [todrive <ToDriveAttribute>*]
|
||||
[formatjson [quotechar <Character>]] [countonly]
|
||||
gam print users countonly [todrive <ToDriveAttribute>*] select <UserTypeEntity>
|
||||
[formatjson [quotechar <Character>]]
|
||||
gam <UserTypeEntity> countonly print users [todrive <ToDriveAttribute>*]
|
||||
[formatjson [quotechar <Character>]]
|
||||
```
|
||||
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.
|
||||
|
||||
@@ -4,9 +4,9 @@ k
|
||||
Print the current version of Gam with details
|
||||
```
|
||||
gam version
|
||||
GAM 7.06.00 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM 7.06.04 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.2 64-bit final
|
||||
Python 3.13.3 64-bit final
|
||||
MacOS Sequoia 15.4 x86_64
|
||||
Path: /Users/Admin/bin/gam7
|
||||
Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
|
||||
@@ -16,9 +16,9 @@ Time: 2023-06-02T21:10:00-07:00
|
||||
Print the current version of Gam with details and time offset information
|
||||
```
|
||||
gam version timeoffset
|
||||
GAM 7.06.00 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM 7.06.04 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.2 64-bit final
|
||||
Python 3.13.3 64-bit final
|
||||
MacOS Sequoia 15.4 x86_64
|
||||
Path: /Users/Admin/bin/gam7
|
||||
Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
|
||||
@@ -28,9 +28,9 @@ 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.06.00 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM 7.06.04 - https://github.com/GAM-team/GAM - pyinstaller
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.2 64-bit final
|
||||
Python 3.13.3 64-bit final
|
||||
MacOS Sequoia 15.4 x86_64
|
||||
Path: /Users/Admin/bin/gam7
|
||||
Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
|
||||
@@ -65,7 +65,7 @@ MacOS High Sierra 10.13.6 x86_64
|
||||
Path: /Users/Admin/bin/gam7
|
||||
Version Check:
|
||||
Current: 5.35.08
|
||||
Latest: 7.06.00
|
||||
Latest: 7.06.04
|
||||
echo $?
|
||||
1
|
||||
```
|
||||
@@ -73,7 +73,7 @@ echo $?
|
||||
Print the current version number without details
|
||||
```
|
||||
gam version simple
|
||||
7.06.00
|
||||
7.06.04
|
||||
```
|
||||
In Linux/MacOS you can do:
|
||||
```
|
||||
@@ -83,9 +83,9 @@ echo $VER
|
||||
Print the current version of Gam and address of this Wiki
|
||||
```
|
||||
gam help
|
||||
GAM 7.06.00 - https://github.com/GAM-team/GAM
|
||||
GAM 7.06.04 - https://github.com/GAM-team/GAM
|
||||
GAM Team <google-apps-manager@googlegroups.com>
|
||||
Python 3.13.2 64-bit final
|
||||
Python 3.13.3 64-bit final
|
||||
MacOS Sequoia 15.4 x86_64
|
||||
Path: /Users/Admin/bin/gam7
|
||||
Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, customer_id: my_customer, domain: domain.com
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
Need more help? Ask on the [GAM Discussion Group](https://groups.google.com/forum/#!forum/google-apps-manager)
|
||||
@@ -1 +1,3 @@
|
||||
Need more help? Ask on the [GAM Discussion Group](https://groups.google.com/forum/#!forum/google-apps-manager)
|
||||
Need more help? Ask on the [GAM Discussion Group](https://groups.google.com/forum/#!forum/google-apps-manager) or [Chat Space](https://github.com/GAM-team/GAM/wiki/GAM-Public-Chat-Room).
|
||||
|
||||
You can suggest edits to these Wiki pages by submitting pull requests against [the wiki files](https://github.com/GAM-team/GAM/tree/main/wiki).
|
||||
|
||||
Reference in New Issue
Block a user