mirror of
https://github.com/GAM-team/GAM.git
synced 2025-07-10 06:33:34 +00:00
Updated gam <UserTypeEntity> move drivefile
to handle the following error:
ERROR: 403: targetUserRoleLimitedByLicenseRestriction - Cannot set the requested role for that user as they lack the necessary license
This commit is contained in:
@ -10,6 +10,13 @@ Add the `-s` option to the end of the above commands to suppress creating the `g
|
||||
|
||||
See [Downloads](https://github.com/taers232c/GAMADV-XTD3/wiki/Downloads) for Windows or other options, including manual installation.
|
||||
|
||||
### 6.64.07
|
||||
|
||||
Updated `gam <UserTypeEntity> move drivefile` to handle the following error:
|
||||
```
|
||||
ERROR: 403: targetUserRoleLimitedByLicenseRestriction - Cannot set the requested role for that user as they lack the necessary license
|
||||
```
|
||||
|
||||
### 6.64.06
|
||||
|
||||
Added fields `devicelicensetype` and `osupdatestatus` to `<CrOSFieldName>`.
|
||||
|
@ -334,7 +334,7 @@ writes the credentials into the file oauth2.txt.
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ rm -f /Users/admin/GAMConfig/oauth2.txt
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ ./gam version
|
||||
WARNING: Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: /Users/admin/GAMConfig/oauth2.txt, Not Found
|
||||
GAMADV-XTD3 6.64.06 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
GAMADV-XTD3 6.64.07 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
Python 3.10.8 64-bit final
|
||||
MacOS High Sierra 10.13.6 x86_64
|
||||
@ -984,7 +984,7 @@ writes the credentials into the file oauth2.txt.
|
||||
C:\GAMADV-XTD3>del C:\GAMConfig\oauth2.txt
|
||||
C:\GAMADV-XTD3>gam version
|
||||
WARNING: Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\GAMConfig\oauth2.txt, Not Found
|
||||
GAMADV-XTD3 6.64.06 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
GAMADV-XTD3 6.64.07 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
Python 3.11.5 64-bit final
|
||||
Windows-10-10.0.17134 AMD64
|
||||
|
@ -4,7 +4,7 @@
|
||||
Print the current version of Gam with details
|
||||
```
|
||||
gam version
|
||||
GAMADV-XTD3 6.64.06 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
GAMADV-XTD3 6.64.07 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
Python 3.11.5 64-bit final
|
||||
MacOS Monterey 12.6.6 x86_64
|
||||
@ -16,7 +16,7 @@ Time: 2023-06-02T21:10:00-07:00
|
||||
Print the current version of Gam with details and time offset information
|
||||
```
|
||||
gam version timeoffset
|
||||
GAMADV-XTD3 6.64.06 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
GAMADV-XTD3 6.64.07 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
Python 3.11.5 64-bit final
|
||||
MacOS Monterey 12.6.6 x86_64
|
||||
@ -28,7 +28,7 @@ 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
|
||||
GAMADV-XTD3 6.64.06 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
GAMADV-XTD3 6.64.07 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
Python 3.11.5 64-bit final
|
||||
MacOS Monterey 12.6.6 x86_64
|
||||
@ -65,7 +65,7 @@ MacOS High Sierra 10.13.6 x86_64
|
||||
Path: /Users/Admin/bin/gamadv-xtd3
|
||||
Version Check:
|
||||
Current: 5.35.08
|
||||
Latest: 6.64.06
|
||||
Latest: 6.64.07
|
||||
echo $?
|
||||
1
|
||||
```
|
||||
@ -73,7 +73,7 @@ echo $?
|
||||
Print the current version number without details
|
||||
```
|
||||
gam version simple
|
||||
6.64.06
|
||||
6.64.07
|
||||
```
|
||||
In Linux/MacOS you can do:
|
||||
```
|
||||
@ -83,7 +83,7 @@ echo $VER
|
||||
Print the current version of Gam and address of this Wiki
|
||||
```
|
||||
gam help
|
||||
GAM 6.64.06 - https://github.com/taers232c/GAMADV-XTD3
|
||||
GAM 6.64.07 - https://github.com/taers232c/GAMADV-XTD3
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
Python 3.11.5 64-bit final
|
||||
MacOS Monterey 12.6.6 x86_64
|
||||
|
@ -1,3 +1,10 @@
|
||||
6.64.07
|
||||
|
||||
Updated `gam <UserTypeEntity> move drivefile` to handle the following error:
|
||||
```
|
||||
ERROR: 403: targetUserRoleLimitedByLicenseRestriction - Cannot set the requested role for that user as they lack the necessary license
|
||||
```
|
||||
|
||||
6.64.06
|
||||
|
||||
Added fields `devicelicensetype` and `osupdatestatus` to `<CrOSFieldName>`.
|
||||
|
@ -56005,6 +56005,7 @@ def moveDriveFile(users):
|
||||
GAPI.FILE_OWNER_NOT_MEMBER_OF_TEAMDRIVE,
|
||||
GAPI.FILE_OWNER_NOT_MEMBER_OF_WRITER_DOMAIN,
|
||||
GAPI.FILE_WRITER_TEAMDRIVE_MOVE_IN_DISABLED,
|
||||
GAPI.TARGET_USER_ROLE_LIMITED_BY_LICENSE_RESTRICTION,
|
||||
GAPI.CANNOT_MOVE_TRASHED_ITEM_INTO_TEAMDRIVE,
|
||||
GAPI.CANNOT_MOVE_TRASHED_ITEM_OUT_OF_TEAMDRIVE,
|
||||
GAPI.CROSS_DOMAIN_MOVE_RESTRICTION],
|
||||
@ -56017,7 +56018,7 @@ def moveDriveFile(users):
|
||||
_incrStatistic(statistics, STAT_FILE_COPIED_MOVED)
|
||||
return (None, None, False)
|
||||
except (GAPI.badRequest, GAPI.insufficientParentPermissions, GAPI.fileOwnerNotMemberOfTeamDrive, GAPI.fileOwnerNotMemberOfWriterDomain,
|
||||
GAPI.fileWriterTeamDriveMoveInDisabled,
|
||||
GAPI.fileWriterTeamDriveMoveInDisabled, GAPI.targetUserRoleLimitedByLicenseRestriction,
|
||||
GAPI.cannotMoveTrashedItemIntoTeamDrive, GAPI.cannotMoveTrashedItemOutOfTeamDrive,
|
||||
GAPI.crossDomainMoveRestriction) as e:
|
||||
entityActionFailedWarning([Ent.USER, user, Ent.DRIVE_FOLDER, folderName], str(e), j, jcount)
|
||||
@ -56040,7 +56041,8 @@ def moveDriveFile(users):
|
||||
try:
|
||||
result = callGAPI(drive.files(), 'create',
|
||||
throwReasons=GAPI.DRIVE_USER_THROW_REASONS+[GAPI.FORBIDDEN, GAPI.INSUFFICIENT_PERMISSIONS, GAPI.INSUFFICIENT_PARENT_PERMISSIONS,
|
||||
GAPI.INTERNAL_ERROR, GAPI.STORAGE_QUOTA_EXCEEDED, GAPI.TEAMDRIVE_HIERARCHY_TOO_DEEP, GAPI.BAD_REQUEST],
|
||||
GAPI.INTERNAL_ERROR, GAPI.STORAGE_QUOTA_EXCEEDED, GAPI.TEAMDRIVE_HIERARCHY_TOO_DEEP,
|
||||
GAPI.BAD_REQUEST, GAPI.TARGET_USER_ROLE_LIMITED_BY_LICENSE_RESTRICTION],
|
||||
body=body, fields='id', supportsAllDrives=True)
|
||||
newFolderId = result['id']
|
||||
action = Act.Get()
|
||||
@ -56059,7 +56061,8 @@ def moveDriveFile(users):
|
||||
['copySubFolderNonInheritedPermissions', 'copyTopFolderNonInheritedPermissions'][atTop])
|
||||
return (newFolderId, newFolderName, False)
|
||||
except (GAPI.forbidden, GAPI.insufficientFilePermissions, GAPI.insufficientParentPermissions,
|
||||
GAPI.internalError, GAPI.storageQuotaExceeded, GAPI.teamDriveHierarchyTooDeep, GAPI.badRequest) as e:
|
||||
GAPI.internalError, GAPI.storageQuotaExceeded, GAPI.teamDriveHierarchyTooDeep,
|
||||
GAPI.badRequest, GAPI.targetUserRoleLimitedByLicenseRestriction) as e:
|
||||
entityActionFailedWarning([Ent.USER, user, Ent.DRIVE_FOLDER, newFolderName], str(e), j, jcount)
|
||||
except (GAPI.serviceNotAvailable, GAPI.authError, GAPI.domainPolicy) as e:
|
||||
userSvcNotApplicableOrDriveDisabled(user, str(e), i, count)
|
||||
@ -56095,7 +56098,8 @@ def moveDriveFile(users):
|
||||
throwReasons=GAPI.DRIVE_USER_THROW_REASONS+[GAPI.FORBIDDEN, GAPI.INSUFFICIENT_PERMISSIONS, GAPI.INSUFFICIENT_PARENT_PERMISSIONS,
|
||||
GAPI.INVALID, GAPI.BAD_REQUEST, GAPI.FILE_NOT_FOUND, GAPI.UNKNOWN_ERROR,
|
||||
GAPI.STORAGE_QUOTA_EXCEEDED, GAPI.TEAMDRIVES_SHARING_RESTRICTION_NOT_ALLOWED,
|
||||
GAPI.TEAMDRIVE_HIERARCHY_TOO_DEEP, GAPI.SHORTCUT_TARGET_INVALID],
|
||||
GAPI.TEAMDRIVE_HIERARCHY_TOO_DEEP, GAPI.SHORTCUT_TARGET_INVALID,
|
||||
GAPI.TARGET_USER_ROLE_LIMITED_BY_LICENSE_RESTRICTION],
|
||||
body=body, fields='id', supportsAllDrives=True)
|
||||
Act.Set(Act.CREATE_SHORTCUT)
|
||||
entityModifierItemValueListActionPerformed(kvList, Act.MODIFIER_IN,
|
||||
@ -56106,7 +56110,7 @@ def moveDriveFile(users):
|
||||
except (GAPI.forbidden, GAPI.insufficientFilePermissions, GAPI.insufficientParentPermissions,
|
||||
GAPI.invalid, GAPI.badRequest, GAPI.fileNotFound, GAPI.unknownError,
|
||||
GAPI.storageQuotaExceeded, GAPI.teamDrivesSharingRestrictionNotAllowed,
|
||||
GAPI.teamDriveHierarchyTooDeep, GAPI.shortcutTargetInvalid) as e:
|
||||
GAPI.teamDriveHierarchyTooDeep, GAPI.shortcutTargetInvalid, GAPI.targetUserRoleLimitedByLicenseRestriction) as e:
|
||||
entityActionFailedWarning(kvList+[Ent.DRIVE_FILE_SHORTCUT, childName], str(e), k, kcount)
|
||||
_incrStatistic(statistics, STAT_FILE_FAILED)
|
||||
|
||||
@ -56124,6 +56128,7 @@ def moveDriveFile(users):
|
||||
GAPI.FILE_OWNER_NOT_MEMBER_OF_TEAMDRIVE,
|
||||
GAPI.FILE_OWNER_NOT_MEMBER_OF_WRITER_DOMAIN,
|
||||
GAPI.FILE_WRITER_TEAMDRIVE_MOVE_IN_DISABLED,
|
||||
GAPI.TARGET_USER_ROLE_LIMITED_BY_LICENSE_RESTRICTION,
|
||||
GAPI.CANNOT_MOVE_TRASHED_ITEM_INTO_TEAMDRIVE,
|
||||
GAPI.CANNOT_MOVE_TRASHED_ITEM_OUT_OF_TEAMDRIVE,
|
||||
GAPI.TEAMDRIVES_SHORTCUT_FILE_NOT_SUPPORTED,
|
||||
@ -56135,6 +56140,7 @@ def moveDriveFile(users):
|
||||
k, kcount)
|
||||
_incrStatistic(statistics, STAT_FILE_COPIED_MOVED)
|
||||
except (GAPI.fileNotFound, GAPI.forbidden, GAPI.internalError, GAPI.unknownError, GAPI.badRequest,
|
||||
GAPI.targetUserRoleLimitedByLicenseRestriction,
|
||||
GAPI.cannotMoveTrashedItemIntoTeamDrive, GAPI.cannotMoveTrashedItemOutOfTeamDrive,
|
||||
GAPI.teamDrivesShortcutFileNotSupported) as e:
|
||||
entityActionFailedWarning(kvList, str(e), k, kcount)
|
||||
|
Reference in New Issue
Block a user