mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-03 12:21:35 +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>)|
|
(folderColorRgb <ColorValue>)|
|
||||||
(indexabletext <String>)|
|
(indexabletext <String>)|
|
||||||
(inheritedpermissionsdisabled [<Boolean>])|
|
(inheritedpermissionsdisabled [<Boolean>])|
|
||||||
|
(itemdownloadrestriction (restrictedforreaders [<Boolean>]) (restrictedforwriters [<Boolean>]))|
|
||||||
(keeprevisionforever|pinned)|
|
(keeprevisionforever|pinned)|
|
||||||
(lastviewedbyme <Time>)|
|
(lastviewedbyme <Time>)|
|
||||||
(mimetype <MimeType>)|
|
(mimetype <MimeType>)|
|
||||||
@@ -7071,6 +7072,10 @@ gam <UserTypeEntity> collect orphans
|
|||||||
contentrestrictions.restrictiontime|
|
contentrestrictions.restrictiontime|
|
||||||
contentrestrictions.type
|
contentrestrictions.type
|
||||||
|
|
||||||
|
<DriveDownloadRestrictionsSubfieldName> ::=
|
||||||
|
downloadrestrictions.itemdownloadrestriction|
|
||||||
|
downloadrestrictions.effectivedownloadrestrictionwithcontext
|
||||||
|
|
||||||
<ClassificationLabelInfoSubfieldName> ::=
|
<ClassificationLabelInfoSubfieldName> ::=
|
||||||
labels.id| # modifiedByMe
|
labels.id| # modifiedByMe
|
||||||
labels.revisionid| # copyRequiresWriterPermission
|
labels.revisionid| # copyRequiresWriterPermission
|
||||||
@@ -7164,6 +7169,8 @@ gam <UserTypeEntity> collect orphans
|
|||||||
copyrequireswriterpermission|
|
copyrequireswriterpermission|
|
||||||
createddate|createdtime|
|
createddate|createdtime|
|
||||||
description|
|
description|
|
||||||
|
downloadrestictions|
|
||||||
|
<DriveDownloadRestrictionsSubfieldName>|
|
||||||
driveid|
|
driveid|
|
||||||
drivename|
|
drivename|
|
||||||
editable|
|
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
|
7.16.00
|
||||||
|
|
||||||
Removed `drive_v3_native_names` from `gam.cfg`; GAM now only uses Drive API v3 fields names on output.
|
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>'
|
__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)'
|
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
||||||
|
|
||||||
#pylint: disable=wrong-import-position
|
#pylint: disable=wrong-import-position
|
||||||
@@ -53817,6 +53817,11 @@ DRIVE_FILE_CONTENT_RESTRICTIONS_CHOICE_MAP = {
|
|||||||
'ownerrestricted': 'ownerRestricted',
|
'ownerrestricted': 'ownerRestricted',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DRIVE_FILE_ITEM_DOWNLOAD_RESTRICTION_CHOICE_MAP = {
|
||||||
|
'restrictedforreaders': 'restrictedForReaders',
|
||||||
|
'restrictedforwriters': 'restrictedForWriters',
|
||||||
|
}
|
||||||
|
|
||||||
def getDriveFileProperty(visibility=None):
|
def getDriveFileProperty(visibility=None):
|
||||||
key = getString(Cmd.OB_PROPERTY_KEY)
|
key = getString(Cmd.OB_PROPERTY_KEY)
|
||||||
value = getString(Cmd.OB_PROPERTY_VALUE, minLen=0) or None
|
value = getString(Cmd.OB_PROPERTY_VALUE, minLen=0) or None
|
||||||
@@ -53903,6 +53908,10 @@ def getDriveFileCopyAttribute(myarg, body, parameters):
|
|||||||
else:
|
else:
|
||||||
Cmd.Backup()
|
Cmd.Backup()
|
||||||
usageErrorExit(Msg.REASON_ONLY_VALID_WITH_CONTENTRESTRICTIONS_READONLY_TRUE)
|
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':
|
elif myarg == 'inheritedpermissionsdisabled':
|
||||||
body['inheritedPermissionsDisabled'] = getBoolean()
|
body['inheritedPermissionsDisabled'] = getBoolean()
|
||||||
elif myarg == 'property':
|
elif myarg == 'property':
|
||||||
@@ -54657,6 +54666,7 @@ DRIVE_FIELDS_CHOICE_MAP = {
|
|||||||
'createddate': 'createdTime',
|
'createddate': 'createdTime',
|
||||||
'createdtime': 'createdTime',
|
'createdtime': 'createdTime',
|
||||||
'description': 'description',
|
'description': 'description',
|
||||||
|
'downloadrestrictions': 'downloadRestrictions',
|
||||||
'driveid': 'driveId',
|
'driveid': 'driveId',
|
||||||
'drivename': 'driveId',
|
'drivename': 'driveId',
|
||||||
'editable': 'capabilities.canEdit',
|
'editable': 'capabilities.canEdit',
|
||||||
@@ -54803,6 +54813,11 @@ DRIVE_CONTENT_RESTRICTIONS_SUBFIELDS_CHOICE_MAP = {
|
|||||||
'type': 'type',
|
'type': 'type',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DRIVE_DOWNLOAD_RESTRICTIONS_SUBFIELDS_CHOICE_MAP = {
|
||||||
|
'itemdownloadrestriction': 'itemDownloadRestriction',
|
||||||
|
'effectivedownloadrestrictionwithcontext': 'effectiveDownloadRestrictionWithContext',
|
||||||
|
}
|
||||||
|
|
||||||
DRIVE_LABELINFO_SUBFIELDS_CHOICE_MAP = {
|
DRIVE_LABELINFO_SUBFIELDS_CHOICE_MAP = {
|
||||||
'id': 'labels(id)',
|
'id': 'labels(id)',
|
||||||
'fields': 'labels(fields)',
|
'fields': 'labels(fields)',
|
||||||
@@ -54867,6 +54882,7 @@ DRIVE_SHORTCUTDETAILS_SUBFIELDS_CHOICE_MAP = {
|
|||||||
DRIVE_SUBFIELDS_CHOICE_MAP = {
|
DRIVE_SUBFIELDS_CHOICE_MAP = {
|
||||||
'capabilities': DRIVE_CAPABILITIES_SUBFIELDS_CHOICE_MAP,
|
'capabilities': DRIVE_CAPABILITIES_SUBFIELDS_CHOICE_MAP,
|
||||||
'contentrestrictions': DRIVE_CONTENT_RESTRICTIONS_SUBFIELDS_CHOICE_MAP,
|
'contentrestrictions': DRIVE_CONTENT_RESTRICTIONS_SUBFIELDS_CHOICE_MAP,
|
||||||
|
'downloadrestrictions': DRIVE_DOWNLOAD_RESTRICTIONS_SUBFIELDS_CHOICE_MAP,
|
||||||
'labelinfo': DRIVE_LABELINFO_SUBFIELDS_CHOICE_MAP,
|
'labelinfo': DRIVE_LABELINFO_SUBFIELDS_CHOICE_MAP,
|
||||||
'labels': DRIVE_LABEL_CHOICE_MAP,
|
'labels': DRIVE_LABEL_CHOICE_MAP,
|
||||||
'lastmodifyinguser': DRIVE_SHARINGUSER_SUBFIELDS_CHOICE_MAP,
|
'lastmodifyinguser': DRIVE_SHARINGUSER_SUBFIELDS_CHOICE_MAP,
|
||||||
|
|||||||
Reference in New Issue
Block a user