From 56c33fec87a338c6af63fe9d17115b39c6b23f2b Mon Sep 17 00:00:00 2001 From: Ross Scroggs Date: Thu, 7 Dec 2023 18:26:59 -0800 Subject: [PATCH] Fixed bug in `gam print filelist ... allfields` that caused a trap --- src/GamCommands.txt | 5 +++++ src/GamUpdate.txt | 5 +++++ src/gam/__init__.py | 10 +++++++--- src/gam/gamlib/glapi.py | 8 -------- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/GamCommands.txt b/src/GamCommands.txt index 3382f097..41392731 100644 --- a/src/GamCommands.txt +++ b/src/GamCommands.txt @@ -6284,6 +6284,7 @@ gam collect orphans canaddfolderfromanotherdrive| canaddmydriveparent| canchangecopyrequireswriterpermission| + canchangecopyrequireswriterpermissionrestriction| canchangedomainusersonlyrestriction| canchangedrivebackground| canchangedrivemembersonlyrestriction| @@ -6301,11 +6302,14 @@ gam collect orphans canmanagemembers| canmodifycontent| canmodifycontentrestriction| + canmodifyeditorcontentrestriction| canmodifylabels| + canmodifyownercontentrestriction| canmovechildrenoutofdrive| canmovechildrenoutofteamdrive| canmovechildrenwithindrive| canmovechildrenwithinteamdrive| + canmoveitemintodrive| canmoveitemintoteamdrive| canmoveitemoutofdrive| canmoveitemoutofteamdrive| @@ -6317,6 +6321,7 @@ gam collect orphans canreadrevisions| canreadteamdrive| canremovechildren| + canremovecontentrestriction| canremovemydriveparent| canrename| canrenamedrive| diff --git a/src/GamUpdate.txt b/src/GamUpdate.txt index f3b29711..799db865 100644 --- a/src/GamUpdate.txt +++ b/src/GamUpdate.txt @@ -2,6 +2,11 @@ Merged GAM-Team version +6.66.09 + +Fixed bug in `gam print filelist ... allfields` that caused a trap +when `gam.cfg` contained `drive_v3_native_names = False`. + 6.66.08 Added additional columns `isBase` and `baseId` to `gam print fileparenttree` diff --git a/src/gam/__init__.py b/src/gam/__init__.py index 3d69def8..5bc23e76 100755 --- a/src/gam/__init__.py +++ b/src/gam/__init__.py @@ -7695,7 +7695,6 @@ class CSVPrintFile(): def MapDrive3TitlesToDrive2(self): _mapDrive3TitlesToDrive2(self.titlesList, API.DRIVE3_TO_DRIVE2_FILES_FIELDS_MAP) - _mapDrive3TitlesToDrive2(self.titlesList, API.DRIVE3_TO_DRIVE2_CAPABILITIES_TITLES_MAP) self.titlesSet = set(self.titlesList) def AddJSONTitle(self, title): @@ -50979,6 +50978,7 @@ DRIVE_CAPABILITIES_SUBFIELDS_CHOICE_MAP = { 'canaddfolderfromanotherdrive': 'canAddFolderFromAnotherDrive', 'canaddmydriveparent': 'canAddMyDriveParent', 'canchangecopyrequireswriterpermission': 'canChangeCopyRequiresWriterPermission', + 'canchangecopyrequireswriterpermissionrestriction': 'canChangeCopyRequiresWriterPermissionRestriction', 'canchangedomainusersonlyrestriction': 'canChangeDomainUsersOnlyRestriction', 'canchangedrivebackground': 'canChangeDriveBackground', 'canchangedrivemembersonlyrestriction': 'canChangeDriveMembersOnlyRestriction', @@ -50996,22 +50996,26 @@ DRIVE_CAPABILITIES_SUBFIELDS_CHOICE_MAP = { 'canmanagemembers': 'canManageMembers', 'canmodifycontent': 'canModifyContent', 'canmodifycontentrestriction': 'canModifyContentRestriction', + 'canmodifyeditorcontentrestriction': 'canModifyEditorContentRestriction', 'canmodifylabels': 'canModifyLabels', + 'canmodifyownercontentrestriction': 'canModifyOwnerContentRestriction', 'canmovechildrenoutofdrive': 'canMoveChildrenOutOfDrive', 'canmovechildrenoutofteamdrive': 'canMoveChildrenOutOfDrive', 'canmovechildrenwithindrive': 'canMoveChildrenWithinDrive', 'canmovechildrenwithinteamdrive': 'canMoveChildrenWithinDrive', - 'canmoveitemintoteamdrive': 'canMoveItemOutOfDrive', + 'canmoveitemintodrive': 'canMoveItemIntoDrive', + 'canmoveitemintoteamdrive': 'canMoveItemIntoDrive', 'canmoveitemoutofdrive': 'canMoveItemOutOfDrive', 'canmoveitemoutofteamdrive': 'canMoveItemOutOfDrive', 'canmoveitemwithindrive': 'canMoveItemWithinDrive', 'canmoveitemwithinteamdrive': 'canMoveItemWithinDrive', - 'canmoveteamdriveitem': ['canMoveItemOutOfDrive', 'canMoveItemWithinDrive'], + 'canmoveteamdriveitem': 'canMoveTeamDriveItem', 'canreaddrive': 'canReadDrive', 'canreadlabels': 'canReadLabels', 'canreadrevisions': 'canReadRevisions', 'canreadteamdrive': 'canReadDrive', 'canremovechildren': 'canRemoveChildren', + 'canremovecontentrestriction': 'canRemoveContentRestriction', 'canremovemydriveparent': 'canRemoveMyDriveParent', 'canrename': 'canRename', 'canrenamedrive': 'canRenameDrive', diff --git a/src/gam/gamlib/glapi.py b/src/gam/gamlib/glapi.py index c6463be4..a0350293 100644 --- a/src/gam/gamlib/glapi.py +++ b/src/gam/gamlib/glapi.py @@ -691,14 +691,6 @@ DRIVE3_TO_DRIVE2_CAPABILITIES_NAMES_MAP = { 'canChangeViewersCanCopyContent': 'canChangeRestrictedDownload', } -DRIVE3_TO_DRIVE2_CAPABILITIES_TITLES_MAP = { - 'capabilities.canComment': 'canComment', - 'capabilities.canReadRevisions': 'canReadRevisions', - 'capabilities.canCopy': 'copyable', - 'capabilities.canEdit': 'editable', - 'capabilities.canShare': 'shareable', - } - DRIVE3_TO_DRIVE2_FILES_FIELDS_MAP = { 'allowFileDiscovery': 'withLink', 'createdTime': 'createdDate',