diff --git a/src/GamUpdate.txt b/src/GamUpdate.txt index 5f43e776..ca6518d5 100644 --- a/src/GamUpdate.txt +++ b/src/GamUpdate.txt @@ -1,10 +1,15 @@ +7.10.07 + +Updated `gam copy|move drivefile` to hanndle additional instances of +the `cannotModifyInheritedPermission` error. + 7.10.06 -"gam print devices clientstates" to include client states in device output +Added option `clientstates` to `gam print devices` to include client states in device output. 7.10.05 -Google renamed an error: cannotModifyInheritedTeamDrivePermission became cannotModifyInheritedPermission. +Google renamed an error: `cannotModifyInheritedTeamDrivePermission` became `cannotModifyInheritedPermission`. GAM will now handle the new error. 7.10.04 diff --git a/src/gam/__init__.py b/src/gam/__init__.py index ab8550ca..dd2c5f82 100755 --- a/src/gam/__init__.py +++ b/src/gam/__init__.py @@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki """ __author__ = 'GAM Team ' -__version__ = '7.10.06' +__version__ = '7.10.07' __license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)' #pylint: disable=wrong-import-position @@ -8864,6 +8864,7 @@ class CSVPrintFile(): GAPI.fileOrganizerNotYetEnabledForThisTeamDrive, GAPI.fileOrganizerOnFoldersInSharedDriveOnly, GAPI.fileOrganizerOnNonTeamDriveNotSupported, + GAPI.cannotModifyInheritedPermission, GAPI.teamDrivesFolderSharingNotSupported, GAPI.invalidLinkVisibility, GAPI.invalidSharingRequest, GAPI.fileNeverWritable, GAPI.abusiveContentRestriction) as e: entityActionFailedWarning([Ent.USER, user, Ent.SPREADSHEET, title, @@ -29957,7 +29958,7 @@ DEVICE_ORDERBY_CHOICE_MAP = { # [orderby [ascending|descending]] # [all|company|personal|nocompanydevices|nopersonaldevices] # [nodeviceusers|oneuserperrow] -# [clientstates] +# [clientstates] # [formatjson [quotechar ]] # [showitemcountonly] def doPrintCIDevices(): @@ -59522,6 +59523,7 @@ def _copyPermissions(drive, user, i, count, j, jcount, GAPI.fileOrganizerNotYetEnabledForThisTeamDrive, GAPI.fileOrganizerOnFoldersInSharedDriveOnly, GAPI.fileOrganizerOnNonTeamDriveNotSupported, + GAPI.cannotModifyInheritedPermission, GAPI.teamDrivesFolderSharingNotSupported, GAPI.invalidLinkVisibility, GAPI.abusiveContentRestriction) as e: entityActionFailedWarning(kvList, str(e), k, kcount) break @@ -60629,6 +60631,7 @@ def _updateMoveFilePermissions(drive, user, i, count, GAPI.fileOrganizerNotYetEnabledForThisTeamDrive, GAPI.fileOrganizerOnFoldersInSharedDriveOnly, GAPI.fileOrganizerOnNonTeamDriveNotSupported, + GAPI.cannotModifyInheritedPermission, GAPI.teamDrivesFolderSharingNotSupported, GAPI.invalidLinkVisibility, GAPI.abusiveContentRestriction) as e: entityActionFailedWarning(kvList, str(e), k, kcount) break @@ -63883,6 +63886,7 @@ def createDriveFileACL(users, useDomainAdminAccess=False): GAPI.fileOrganizerNotYetEnabledForThisTeamDrive, GAPI.fileOrganizerOnFoldersInSharedDriveOnly, GAPI.fileOrganizerOnNonTeamDriveNotSupported, + GAPI.cannotModifyInheritedPermission, GAPI.teamDrivesFolderSharingNotSupported, GAPI.invalidLinkVisibility, GAPI.invalidSharingRequest, GAPI.fileNeverWritable, GAPI.abusiveContentRestriction) as e: entityActionFailedWarning([Ent.USER, user, entityType, fileName, Ent.PERMISSION_ID, permissionId], str(e), j, jcount) @@ -64118,6 +64122,7 @@ def createDriveFilePermissions(users, useDomainAdminAccess=False): GAPI.fileOrganizerNotYetEnabledForThisTeamDrive, GAPI.fileOrganizerOnFoldersInSharedDriveOnly, GAPI.fileOrganizerOnNonTeamDriveNotSupported, + GAPI.cannotModifyInheritedPermission, GAPI.teamDrivesFolderSharingNotSupported, GAPI.invalidLinkVisibility, GAPI.invalidSharingRequest, GAPI.fileNeverWritable, GAPI.abusiveContentRestriction, GAPI.serviceNotAvailable, GAPI.authError, GAPI.domainPolicy) as e: diff --git a/src/gam/gamlib/glgapi.py b/src/gam/gamlib/glgapi.py index 0caf15da..1ece73e5 100644 --- a/src/gam/gamlib/glgapi.py +++ b/src/gam/gamlib/glgapi.py @@ -229,6 +229,7 @@ DRIVE3_CREATE_ACL_THROW_REASONS = [BAD_REQUEST, INVALID, INVALID_SHARING_REQUEST FILE_ORGANIZER_NOT_YET_ENABLED_FOR_THIS_TEAMDRIVE, FILE_ORGANIZER_ON_FOLDERS_IN_SHARED_DRIVE_ONLY, FILE_ORGANIZER_ON_NON_TEAMDRIVE_NOT_SUPPORTED, + CANNOT_MODIFY_INHERITED_PERMISSION, TEAMDRIVES_FOLDER_SHARING_NOT_SUPPORTED, INVALID_LINK_VISIBILITY, ABUSIVE_CONTENT_RESTRICTION] DRIVE3_GET_ACL_REASONS = DRIVE_USER_THROW_REASONS+[FILE_NOT_FOUND, FORBIDDEN, INTERNAL_ERROR, INSUFFICIENT_ADMINISTRATOR_PRIVILEGES, INSUFFICIENT_FILE_PERMISSIONS,