Two updates (#1327)

* Add writerscanshare to file characteristics

* In print filelist, include counts for permissions, parents, owners
This commit is contained in:
Ross Scroggs
2021-03-11 11:01:50 -08:00
committed by GitHub
parent d8ca573983
commit 7e706518c5
2 changed files with 6 additions and 2 deletions

View File

@@ -693,7 +693,7 @@ Specify a collection of Users by directly specifying them or by specifiying item
(contentrestrictions readonly true [reason <String>])|
copyrequireswriterpermission|
(lastviewedbyme <Time>)|(modifieddate|modifiedtime <Time>)|(description <String>)|(mimetype <MimeType>)|
(parentid <DriveFolderID>)|(parentname <DriveFolderName>)|(anyownerparentname <DriveFolderName>)|writerscantshare|
(parentid <DriveFolderID>)|(parentname <DriveFolderName>)|(anyownerparentname <DriveFolderName>)|writerscantshare|writerscanshare
(shortcut <DriveFileID>)
<DriveFileUpdateAttribute> ::=
(localfile <FileName>)|
@@ -703,7 +703,7 @@ Specify a collection of Users by directly specifying them or by specifiying item
(contentrestrictions readonly true [reason <String>])|
(copyrequireswriterpermission <Boolean>)|
(lastviewedbyme <Time>)|(modifieddate <Time>)|(description <String>)|(mimetype <MimeType>)|
(parentid <DriveFolderID>)|(parentname <DriveFolderName>)|(anyownerparentname <DriveFolderName>)|writerscantshare|
(parentid <DriveFolderID>)|(parentname <DriveFolderName>)|(anyownerparentname <DriveFolderName>)|writerscantshare|writerscanshare
(shortcut <DriveFileID>)
<GroupSettingsAttribute> ::=
(allowexternalmembers <Boolean>)|

View File

@@ -3278,6 +3278,7 @@ def printDriveFileList(users):
titles.append(attrib)
a_file[attrib] = ' '.join(f_file[attrib])
else:
a_file[attrib] = len(f_file[attrib])
for j, l_attrib in enumerate(f_file[attrib]):
for list_attrib in l_attrib:
if list_attrib in [
@@ -3628,6 +3629,9 @@ def getDriveFileAttribute(i, body, parameters, myarg, update=False):
elif myarg == 'writerscantshare':
body['writersCanShare'] = False
i += 1
elif myarg == 'writerscanshare':
body['writersCanShare'] = True
i += 1
elif myarg == 'contentrestrictions':
body['contentRestrictions'] = [{}]
restriction = sys.argv[i+1].lower().replace('_', '')