Skip to content

Commit

Permalink
Updated option showlastmodification to `gam <UserTypeEntity> print|…
Browse files Browse the repository at this point in the history
…show filecounts`
  • Loading branch information
taers232c committed Oct 2, 2024
1 parent acfd285 commit 4232031
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ script:

before_deploy:
# Comment out for Linux Xenial and Trusty
#- yes | gem update --system --force
#- gem install bundler
#- gem install uri
#- gem install logger
- yes | gem update --system --force
- gem install bundler
- gem install uri
- gem install logger
- export TRAVIS_TAG="preview"
- unset LD_LIBRARY_PATH

Expand All @@ -113,8 +113,8 @@ deploy:
# Linux 64-Bit Bionic and Linux ARM64 Focal and Linux ARM64 Bionic and Linux ARM64 Xenial
edge: true
# Linux Xenial and Trusty
edge:
branch: v2.0.3-beta.4
# edge:
# branch: v2.0.3-beta.4
# branch: v2.0.5-beta.1
on:
repo: taers232c/GAMADV-XTD3
Expand Down
4 changes: 4 additions & 0 deletions src/GamUpdate.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
7.00.12

Updated option `showlastmodification` to `gam <UserTypeEntity> print|show filecounts` to handle
the case where all users owning files are suspended. In this case the `lastModifyingUser` column
will show the user's display name as the API doesn't return the user's email address.

Updated support for `Folders with limited access`; this is a work in progress.

7.00.11
Expand Down
7 changes: 3 additions & 4 deletions src/gam/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4734,8 +4734,6 @@ def defaultSvcAcctScopes():
saScopes[API.DRIVE2] = saScopes[API.DRIVE3]
saScopes[API.DRIVETD] = saScopes[API.DRIVE3]
saScopes[API.SHEETSTD] = saScopes[API.SHEETS]
### Drive v3beta
saScopes[API.DRIVE3B] = saScopes[API.DRIVE3]
return saScopes

def _getSvcAcctData():
Expand Down Expand Up @@ -56233,7 +56231,7 @@ def _setSelectionFields():
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(emailAddress)'])
fieldsList.extend(['id,name,modifiedTime,lastModifyingUser(me, displayName, emailAddress)'])
if DLP.filenameMatchPattern:
fieldsList.append('name')
if DLP.excludeTrashed:
Expand Down Expand Up @@ -56428,7 +56426,8 @@ def showMimeTypeInfo(user, mimeTypeInfo, sharedDriveId, sharedDriveName, lastMod
userLastModification['lastModifiedFileId'] = f_file['id']
userLastModification['lastModifiedFileName'] = _stripControlCharsFromName(f_file['name'])
userLastModification['lastModifiedTime'] = f_file['modifiedTime']
userLastModification['lastModifyingUser'] = f_file['lastModifyingUser'].get('emailAddress', UNKNOWN)
userLastModification['lastModifyingUser'] = f_file['lastModifyingUser'].get('emailAddress',
f_file['lastModifyingUser'].get('displayName', UNKNOWN))
showMimeTypeInfo(user, mimeTypeInfo, sharedDriveId, sharedDriveName, userLastModification, i, count)
if showLastModification and userLastModification['lastModifiedTime'] > summaryLastModification['lastModifiedTime']:
summaryLastModification = userLastModification.copy()
Expand Down

0 comments on commit 4232031

Please sign in to comment.