mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-05 05:11:35 +00:00
Updated gam <UserTypeEntity> create|update drivefileacl ... expiration <Time> to handle additional API errors.
This commit is contained in:
@@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki
|
||||
"""
|
||||
|
||||
__author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
|
||||
__version__ = '7.06.00'
|
||||
__version__ = '7.06.01'
|
||||
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
||||
|
||||
#pylint: disable=wrong-import-position
|
||||
@@ -63090,7 +63090,8 @@ def createDriveFileACL(users, useDomainAdminAccess=False):
|
||||
if showDetails:
|
||||
_showDriveFilePermission(permission, printKeys, timeObjects)
|
||||
except (GAPI.badRequest, GAPI.invalid, GAPI.fileNotFound, GAPI.forbidden, GAPI.internalError,
|
||||
GAPI.cannotSetExpiration, GAPI.expirationDateNotAllowedForSharedDriveMembers,
|
||||
GAPI.cannotSetExpiration, GAPI.cannotSetExpirationOnAnyoneOrDomain,
|
||||
GAPI.expirationDateNotAllowedForSharedDriveMembers, GAPI.expirationDatesMustBeInTheFuture,
|
||||
GAPI.insufficientFilePermissions, GAPI.unknownError, GAPI.ownershipChangeAcrossDomainNotPermitted,
|
||||
GAPI.teamDriveDomainUsersOnlyRestriction, GAPI.teamDriveTeamMembersOnlyRestriction,
|
||||
GAPI.targetUserRoleLimitedByLicenseRestriction, GAPI.insufficientAdministratorPrivileges, GAPI.sharingRateLimitExceeded,
|
||||
@@ -63225,7 +63226,8 @@ def updateDriveFileACLs(users, useDomainAdminAccess=False):
|
||||
if showDetails:
|
||||
_showDriveFilePermission(permission, printKeys, timeObjects)
|
||||
except (GAPI.fileNotFound, GAPI.forbidden, GAPI.internalError, GAPI.insufficientFilePermissions, GAPI.unknownError,
|
||||
GAPI.cannotSetExpiration, GAPI.expirationDateNotAllowedForSharedDriveMembers,
|
||||
GAPI.cannotSetExpiration, GAPI.cannotSetExpirationOnAnyoneOrDomain,
|
||||
GAPI.expirationDateNotAllowedForSharedDriveMembers, GAPI.expirationDatesMustBeInTheFuture,
|
||||
GAPI.badRequest, GAPI.invalidOwnershipTransfer, GAPI.cannotRemoveOwner,
|
||||
GAPI.fileNeverWritable, GAPI.ownershipChangeAcrossDomainNotPermitted, GAPI.sharingRateLimitExceeded,
|
||||
GAPI.targetUserRoleLimitedByLicenseRestriction, GAPI.insufficientAdministratorPrivileges,
|
||||
@@ -63325,7 +63327,8 @@ def createDriveFilePermissions(users, useDomainAdminAccess=False):
|
||||
body=_makePermissionBody(ri[RI_ITEM]), fields='', supportsAllDrives=True)
|
||||
entityActionPerformed([Ent.DRIVE_FILE_OR_FOLDER_ID, ri[RI_ENTITY], Ent.PERMITTEE, ri[RI_ITEM]], int(ri[RI_J]), int(ri[RI_JCOUNT]))
|
||||
except (GAPI.badRequest, GAPI.invalid, GAPI.fileNotFound, GAPI.forbidden, GAPI.internalError,
|
||||
GAPI.cannotSetExpiration, GAPI.expirationDateNotAllowedForSharedDriveMembers,
|
||||
GAPI.cannotSetExpiration, GAPI.cannotSetExpirationOnAnyoneOrDomain,
|
||||
GAPI.expirationDateNotAllowedForSharedDriveMembers, GAPI.expirationDatesMustBeInTheFuture,
|
||||
GAPI.insufficientFilePermissions, GAPI.unknownError, GAPI.ownershipChangeAcrossDomainNotPermitted,
|
||||
GAPI.teamDriveDomainUsersOnlyRestriction, GAPI.teamDriveTeamMembersOnlyRestriction,
|
||||
GAPI.targetUserRoleLimitedByLicenseRestriction, GAPI.insufficientAdministratorPrivileges, GAPI.sharingRateLimitExceeded,
|
||||
|
||||
Reference in New Issue
Block a user