mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-28 18:01:36 +00:00
Added file property downloadRestrictions
Some checks failed
Build and test GAM / build (build, 1, Build Intel Ubuntu Jammy, ubuntu-22.04) (push) Has been cancelled
Build and test GAM / build (build, 10, Build Intel Windows, windows-2022) (push) Has been cancelled
Build and test GAM / build (build, 11, Build Arm Windows, windows-11-arm) (push) Has been cancelled
Build and test GAM / build (build, 2, Build Intel Ubuntu Noble, ubuntu-24.04) (push) Has been cancelled
Build and test GAM / build (build, 3, Build Arm Ubuntu Noble, ubuntu-24.04-arm) (push) Has been cancelled
Build and test GAM / build (build, 4, Build Arm Ubuntu Jammy, ubuntu-22.04-arm) (push) Has been cancelled
Build and test GAM / build (build, 5, Build Intel StaticX Legacy, ubuntu-22.04, yes) (push) Has been cancelled
Build and test GAM / build (build, 6, Build Arm StaticX Legacy, ubuntu-22.04-arm, yes) (push) Has been cancelled
Build and test GAM / build (build, 7, Build Intel MacOS, macos-13) (push) Has been cancelled
Build and test GAM / build (build, 8, Build Arm MacOS 14, macos-14) (push) Has been cancelled
Build and test GAM / build (build, 9, Build Arm MacOS 15, macos-15) (push) Has been cancelled
Build and test GAM / build (test, 12, Test Python 3.10, ubuntu-24.04, 3.10) (push) Has been cancelled
Build and test GAM / build (test, 13, Test Python 3.11, ubuntu-24.04, 3.11) (push) Has been cancelled
Build and test GAM / build (test, 14, Test Python 3.12, ubuntu-24.04, 3.12) (push) Has been cancelled
Build and test GAM / build (test, 15, Test Python 3.14-dev, ubuntu-24.04, 3.14-dev) (push) Has been cancelled
Build and test GAM / merge (push) Has been cancelled
Build and test GAM / publish (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Check for Google Root CA Updates / check-apis (push) Has been cancelled
Some checks failed
Build and test GAM / build (build, 1, Build Intel Ubuntu Jammy, ubuntu-22.04) (push) Has been cancelled
Build and test GAM / build (build, 10, Build Intel Windows, windows-2022) (push) Has been cancelled
Build and test GAM / build (build, 11, Build Arm Windows, windows-11-arm) (push) Has been cancelled
Build and test GAM / build (build, 2, Build Intel Ubuntu Noble, ubuntu-24.04) (push) Has been cancelled
Build and test GAM / build (build, 3, Build Arm Ubuntu Noble, ubuntu-24.04-arm) (push) Has been cancelled
Build and test GAM / build (build, 4, Build Arm Ubuntu Jammy, ubuntu-22.04-arm) (push) Has been cancelled
Build and test GAM / build (build, 5, Build Intel StaticX Legacy, ubuntu-22.04, yes) (push) Has been cancelled
Build and test GAM / build (build, 6, Build Arm StaticX Legacy, ubuntu-22.04-arm, yes) (push) Has been cancelled
Build and test GAM / build (build, 7, Build Intel MacOS, macos-13) (push) Has been cancelled
Build and test GAM / build (build, 8, Build Arm MacOS 14, macos-14) (push) Has been cancelled
Build and test GAM / build (build, 9, Build Arm MacOS 15, macos-15) (push) Has been cancelled
Build and test GAM / build (test, 12, Test Python 3.10, ubuntu-24.04, 3.10) (push) Has been cancelled
Build and test GAM / build (test, 13, Test Python 3.11, ubuntu-24.04, 3.11) (push) Has been cancelled
Build and test GAM / build (test, 14, Test Python 3.12, ubuntu-24.04, 3.12) (push) Has been cancelled
Build and test GAM / build (test, 15, Test Python 3.14-dev, ubuntu-24.04, 3.14-dev) (push) Has been cancelled
Build and test GAM / merge (push) Has been cancelled
Build and test GAM / publish (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Check for Google Root CA Updates / check-apis (push) Has been cancelled
This commit is contained in:
@@ -6597,6 +6597,7 @@ gam <UserTypeEntity> print chatemojis [todrive <ToDriveAttribute>*]
|
||||
(folderColorRgb <ColorValue>)|
|
||||
(indexabletext <String>)|
|
||||
(inheritedpermissionsdisabled [<Boolean>])|
|
||||
(itemdownloadrestriction (restrictedforreaders [<Boolean>]) (restrictedforwriters [<Boolean>]))|
|
||||
(keeprevisionforever|pinned)|
|
||||
(lastviewedbyme <Time>)|
|
||||
(mimetype <MimeType>)|
|
||||
@@ -7071,6 +7072,10 @@ gam <UserTypeEntity> collect orphans
|
||||
contentrestrictions.restrictiontime|
|
||||
contentrestrictions.type
|
||||
|
||||
<DriveDownloadRestrictionsSubfieldName> ::=
|
||||
downloadrestrictions.itemdownloadrestriction|
|
||||
downloadrestrictions.effectivedownloadrestrictionwithcontext
|
||||
|
||||
<ClassificationLabelInfoSubfieldName> ::=
|
||||
labels.id| # modifiedByMe
|
||||
labels.revisionid| # copyRequiresWriterPermission
|
||||
@@ -7164,6 +7169,8 @@ gam <UserTypeEntity> collect orphans
|
||||
copyrequireswriterpermission|
|
||||
createddate|createdtime|
|
||||
description|
|
||||
downloadrestictions|
|
||||
<DriveDownloadRestrictionsSubfieldName>|
|
||||
driveid|
|
||||
drivename|
|
||||
editable|
|
||||
|
||||
@@ -1,3 +1,23 @@
|
||||
7.16.01
|
||||
|
||||
Added `downloadrestictions` and `<DriveDownloadRestrictionsSubfieldName>` to `<DriveFieldName>`.
|
||||
```
|
||||
<DriveDownloadRestrictionsSubfieldName> ::=
|
||||
downloadrestrictions.itemdownloadrestriction|
|
||||
downloadrestrictions.effectivedownloadrestrictionwithcontext
|
||||
```
|
||||
|
||||
Added `itemdownloadrestriction (restrictedforreaders [<Boolean>]) (restrictedforwriters [<Boolean>])`
|
||||
to `<DriveFileAttribute>`.
|
||||
|
||||
From the Drive API documentation:
|
||||
```
|
||||
itemDownloadRestriction - The download restriction of the file applied directly by the owner or organizer. This does not take into account shared drive settings or DLP rules.
|
||||
effectiveDownloadRestrictionWithContext - Output only. The effective download restriction applied to this file. This considers all restriction settings and DLP rules.
|
||||
restrictedForReaders - Whether download and copy is restricted for readers.
|
||||
restrictedForWriters - Whether download and copy is restricted for writers. If true, download is also restricted for readers.
|
||||
```
|
||||
|
||||
7.16.00
|
||||
|
||||
Removed `drive_v3_native_names` from `gam.cfg`; GAM now only uses Drive API v3 fields names on output.
|
||||
|
||||
@@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki
|
||||
"""
|
||||
|
||||
__author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
|
||||
__version__ = '7.16.00'
|
||||
__version__ = '7.16.01'
|
||||
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
||||
|
||||
#pylint: disable=wrong-import-position
|
||||
@@ -53817,6 +53817,11 @@ DRIVE_FILE_CONTENT_RESTRICTIONS_CHOICE_MAP = {
|
||||
'ownerrestricted': 'ownerRestricted',
|
||||
}
|
||||
|
||||
DRIVE_FILE_ITEM_DOWNLOAD_RESTRICTION_CHOICE_MAP = {
|
||||
'restrictedforreaders': 'restrictedForReaders',
|
||||
'restrictedforwriters': 'restrictedForWriters',
|
||||
}
|
||||
|
||||
def getDriveFileProperty(visibility=None):
|
||||
key = getString(Cmd.OB_PROPERTY_KEY)
|
||||
value = getString(Cmd.OB_PROPERTY_VALUE, minLen=0) or None
|
||||
@@ -53903,6 +53908,10 @@ def getDriveFileCopyAttribute(myarg, body, parameters):
|
||||
else:
|
||||
Cmd.Backup()
|
||||
usageErrorExit(Msg.REASON_ONLY_VALID_WITH_CONTENTRESTRICTIONS_READONLY_TRUE)
|
||||
elif myarg == 'itemdownloadrestriction':
|
||||
body.setdefault('downloadRestrictions', {'itemDownloadRestriction': {}})
|
||||
restriction = getChoice(DRIVE_FILE_ITEM_DOWNLOAD_RESTRICTION_CHOICE_MAP, mapChoice=True)
|
||||
body['downloadRestrictions']['itemDownloadRestriction'][restriction] = getBoolean()
|
||||
elif myarg == 'inheritedpermissionsdisabled':
|
||||
body['inheritedPermissionsDisabled'] = getBoolean()
|
||||
elif myarg == 'property':
|
||||
@@ -54657,6 +54666,7 @@ DRIVE_FIELDS_CHOICE_MAP = {
|
||||
'createddate': 'createdTime',
|
||||
'createdtime': 'createdTime',
|
||||
'description': 'description',
|
||||
'downloadrestrictions': 'downloadRestrictions',
|
||||
'driveid': 'driveId',
|
||||
'drivename': 'driveId',
|
||||
'editable': 'capabilities.canEdit',
|
||||
@@ -54803,6 +54813,11 @@ DRIVE_CONTENT_RESTRICTIONS_SUBFIELDS_CHOICE_MAP = {
|
||||
'type': 'type',
|
||||
}
|
||||
|
||||
DRIVE_DOWNLOAD_RESTRICTIONS_SUBFIELDS_CHOICE_MAP = {
|
||||
'itemdownloadrestriction': 'itemDownloadRestriction',
|
||||
'effectivedownloadrestrictionwithcontext': 'effectiveDownloadRestrictionWithContext',
|
||||
}
|
||||
|
||||
DRIVE_LABELINFO_SUBFIELDS_CHOICE_MAP = {
|
||||
'id': 'labels(id)',
|
||||
'fields': 'labels(fields)',
|
||||
@@ -54867,6 +54882,7 @@ DRIVE_SHORTCUTDETAILS_SUBFIELDS_CHOICE_MAP = {
|
||||
DRIVE_SUBFIELDS_CHOICE_MAP = {
|
||||
'capabilities': DRIVE_CAPABILITIES_SUBFIELDS_CHOICE_MAP,
|
||||
'contentrestrictions': DRIVE_CONTENT_RESTRICTIONS_SUBFIELDS_CHOICE_MAP,
|
||||
'downloadrestrictions': DRIVE_DOWNLOAD_RESTRICTIONS_SUBFIELDS_CHOICE_MAP,
|
||||
'labelinfo': DRIVE_LABELINFO_SUBFIELDS_CHOICE_MAP,
|
||||
'labels': DRIVE_LABEL_CHOICE_MAP,
|
||||
'lastmodifyinguser': DRIVE_SHARINGUSER_SUBFIELDS_CHOICE_MAP,
|
||||
|
||||
Reference in New Issue
Block a user