From 5b57b51384a456a5206e4663302bcd402671e8c6 Mon Sep 17 00:00:00 2001 From: Ross Scroggs Date: Mon, 28 Jul 2025 16:39:20 -0700 Subject: [PATCH] Added file property downloadRestrictions --- wiki/GamUpdates.md | 20 ++++++++++++++++++++ wiki/How-to-Upgrade-Legacy-GAM-to-GAM7.md | 4 ++-- wiki/Users-Drive-Files-Display.md | 14 ++++++++++---- wiki/Users-Drive-Files-Manage.md | 1 + wiki/Version-and-Help.md | 12 ++++++------ 5 files changed, 39 insertions(+), 12 deletions(-) diff --git a/wiki/GamUpdates.md b/wiki/GamUpdates.md index 87e075ed..dcb4406d 100644 --- a/wiki/GamUpdates.md +++ b/wiki/GamUpdates.md @@ -10,6 +10,26 @@ Add the `-s` option to the end of the above commands to suppress creating the `g See [Downloads-Installs-GAM7](https://github.com/GAM-team/GAM/wiki/Downloads-Installs) for Windows or other options, including manual installation +### 7.16.01 + +Added `downloadrestictions` and `` to ``. +``` + ::= + downloadrestrictions.itemdownloadrestriction| + downloadrestrictions.effectivedownloadrestrictionwithcontext +``` + +Added `itemdownloadrestriction (restrictedforreaders []) (restrictedforwriters [])` +to ``. + +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. diff --git a/wiki/How-to-Upgrade-Legacy-GAM-to-GAM7.md b/wiki/How-to-Upgrade-Legacy-GAM-to-GAM7.md index 7dccd6e0..a689273c 100644 --- a/wiki/How-to-Upgrade-Legacy-GAM-to-GAM7.md +++ b/wiki/How-to-Upgrade-Legacy-GAM-to-GAM7.md @@ -252,7 +252,7 @@ writes the credentials into the file oauth2.txt. admin@server:/Users/admin$ rm -f /Users/admin/GAMConfig/oauth2.txt admin@server:/Users/admin$ gam version WARNING: Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: /Users/admin/GAMConfig/oauth2.txt, Not Found -GAM 7.16.00 - https://github.com/GAM-team/GAM - pyinstaller +GAM 7.16.01 - https://github.com/GAM-team/GAM - pyinstaller GAM Team Python 3.13.5 64-bit final MacOS Sequoia 15.5 x86_64 @@ -990,7 +990,7 @@ writes the credentials into the file oauth2.txt. C:\>del C:\GAMConfig\oauth2.txt C:\>gam version WARNING: Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\GAMConfig\oauth2.txt, Not Found -GAM 7.16.00 - https://github.com/GAM-team/GAM - pythonsource +GAM 7.16.01 - https://github.com/GAM-team/GAM - pythonsource GAM Team Python 3.13.5 64-bit final Windows-10-10.0.17134 AMD64 diff --git a/wiki/Users-Drive-Files-Display.md b/wiki/Users-Drive-Files-Display.md index d01c8222..c161c2af 100644 --- a/wiki/Users-Drive-Files-Display.md +++ b/wiki/Users-Drive-Files-Display.md @@ -157,12 +157,16 @@ contentrestrictions.restrictiontime| contentrestrictions.type - ::= + ::= + downloadrestrictions.itemdownloadrestriction| + downloadrestrictions.effectivedownloadrestrictionwithcontext + + ::= labels.id| # modifiedByMe labels.revisionid| # copyRequiresWriterPermission labels.fields # viewedByMe - ::= + ::= labels.modified| # modifiedByMe labels.restricted| # copyRequiresWriterPermission labels.starred| # starred @@ -251,6 +255,8 @@ copyrequireswriterpermission| createddate|createdtime| description| + downloadrestictions| + | driveid| drivename| editable| @@ -269,9 +275,9 @@ inheritedpermissionsdisabled| isappauthorized| labelinfo| - | + | labels| - | + | lastmodifyinguser| | lastmodifyingusername| diff --git a/wiki/Users-Drive-Files-Manage.md b/wiki/Users-Drive-Files-Manage.md index 6a680f3c..c53ce512 100644 --- a/wiki/Users-Drive-Files-Manage.md +++ b/wiki/Users-Drive-Files-Manage.md @@ -125,6 +125,7 @@ (folderColorRgb )| (indexabletext )| (inheritedpermissionsdisabled [])| + (itemdownloadrestriction (restrictedforreaders []) (restrictedforwriters []))| (keeprevisionforever|pinned)| (lastviewedbyme