mirror of
https://github.com/GAM-team/GAM.git
synced 2025-07-06 20:53:35 +00:00
Added option contentrestrictions ownerrestricted [<Boolean>]
to <DriveFileAttribute>
.
This commit is contained in:
@ -5833,9 +5833,7 @@ gam <UserTypeEntity> show datastudiopermissions
|
|||||||
<FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVSubkeySelector> | <CSVDataSelector>)
|
<FileSelector> | <CSVFileSelector> | <CSVkmdSelector> | <CSVSubkeySelector> | <CSVDataSelector>)
|
||||||
|
|
||||||
<DriveFileAttribute> ::=
|
<DriveFileAttribute> ::=
|
||||||
(contentrestrictions ownerrestricted [<Boolean>])|
|
(contentrestrictions (readonly false)|(readonly true [reason <String>]) [ownerrestricted [<Boolean>]])|
|
||||||
(contentrestrictions readonly false)|
|
|
||||||
(contentrestrictions readonly true [reason <String>])|
|
|
||||||
(copyrequireswriterpermission [<Boolean>])|
|
(copyrequireswriterpermission [<Boolean>])|
|
||||||
(description <String>)|
|
(description <String>)|
|
||||||
(folderColorRgb <ColorValue>)|
|
(folderColorRgb <ColorValue>)|
|
||||||
@ -5906,9 +5904,7 @@ gam <UserTypeEntity> update drivefile <DriveFileEntity> [copy] [returnidonly|ret
|
|||||||
[charset <CharSet>] [columndelimiter <Character>]
|
[charset <CharSet>] [columndelimiter <Character>]
|
||||||
|
|
||||||
<DriveFileCopyAttribute> ::=
|
<DriveFileCopyAttribute> ::=
|
||||||
(contentrestrictions ownerrestricted [<Boolean>])|
|
(contentrestrictions (readonly false)|(readonly true [reason <String>]) [ownerrestricted [<Boolean>]])|
|
||||||
(contentrestrictions readonly false)|
|
|
||||||
(contentrestrictions readonly true [reason <String>])|
|
|
||||||
(copyrequireswriterpermission [<Boolean>])|
|
(copyrequireswriterpermission [<Boolean>])|
|
||||||
(description <String>)|
|
(description <String>)|
|
||||||
ignoredefaultvisibility|
|
ignoredefaultvisibility|
|
||||||
|
@ -11,7 +11,7 @@ Added option `contentrestrictions ownerrestricted [<Boolean>]` to `<DriveFileAtt
|
|||||||
Added `aggregatebyuser [Boolean]` option to `gam report user` to allow data aggregation for users across multiple dates.
|
Added `aggregatebyuser [Boolean]` option to `gam report user` to allow data aggregation for users across multiple dates.
|
||||||
Options `aggregatebyuser` and `aggregatebydate` are mutually exclusive.
|
Options `aggregatebyuser` and `aggregatebydate` are mutually exclusive.
|
||||||
|
|
||||||
* https://github.com/taers232c/GAMADV-XTD3/wiki/Reports#user-reports
|
* See: https://github.com/taers232c/GAMADV-XTD3/wiki/Reports#user-reports
|
||||||
|
|
||||||
6.61.13
|
6.61.13
|
||||||
|
|
||||||
|
@ -48669,13 +48669,14 @@ DRIVEFILE_PROPERTY_VISIBILITY_CHOICE_MAP = {
|
|||||||
|
|
||||||
DRIVE_FILE_CONTENT_RESTRICTIONS_CHOICE_MAP = {
|
DRIVE_FILE_CONTENT_RESTRICTIONS_CHOICE_MAP = {
|
||||||
'readonly': 'readOnly',
|
'readonly': 'readOnly',
|
||||||
|
'ownerrestricted': 'ownerRestricted',
|
||||||
}
|
}
|
||||||
|
|
||||||
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
|
||||||
if visibility is None:
|
if visibility is None:
|
||||||
if Cmd.PeekArgumentPresent(DRIVEFILE_PROPERTY_VISIBILITY_CHOICE_MAP):
|
if Cmd.PeekArgumentPresent(list(DRIVEFILE_PROPERTY_VISIBILITY_CHOICE_MAP.keys())):
|
||||||
visibility = getChoice(DRIVEFILE_PROPERTY_VISIBILITY_CHOICE_MAP, mapChoice=True)
|
visibility = getChoice(DRIVEFILE_PROPERTY_VISIBILITY_CHOICE_MAP, mapChoice=True)
|
||||||
else:
|
else:
|
||||||
visibility = 'properties'
|
visibility = 'properties'
|
||||||
@ -48746,10 +48747,11 @@ def getDriveFileCopyAttribute(myarg, body, parameters):
|
|||||||
elif myarg == 'writerscantshare':
|
elif myarg == 'writerscantshare':
|
||||||
body['writersCanShare'] = not getBoolean()
|
body['writersCanShare'] = not getBoolean()
|
||||||
elif myarg == 'contentrestrictions':
|
elif myarg == 'contentrestrictions':
|
||||||
body['contentRestrictions'] = [{}]
|
while Cmd.PeekArgumentPresent(list(DRIVE_FILE_CONTENT_RESTRICTIONS_CHOICE_MAP.keys())):
|
||||||
|
body.setdefault('contentRestrictions', [{}])
|
||||||
restriction = getChoice(DRIVE_FILE_CONTENT_RESTRICTIONS_CHOICE_MAP, mapChoice=True)
|
restriction = getChoice(DRIVE_FILE_CONTENT_RESTRICTIONS_CHOICE_MAP, mapChoice=True)
|
||||||
if restriction == 'readOnly':
|
|
||||||
body['contentRestrictions'][0][restriction] = getBoolean()
|
body['contentRestrictions'][0][restriction] = getBoolean()
|
||||||
|
if restriction == 'readOnly':
|
||||||
if checkArgumentPresent(['reason']):
|
if checkArgumentPresent(['reason']):
|
||||||
if body['contentRestrictions'][0][restriction]:
|
if body['contentRestrictions'][0][restriction]:
|
||||||
body['contentRestrictions'][0]['reason'] = getString(Cmd.OB_STRING, minLen=0)
|
body['contentRestrictions'][0]['reason'] = getString(Cmd.OB_STRING, minLen=0)
|
||||||
@ -49647,6 +49649,7 @@ DRIVE_CAPABILITIES_SUBFIELDS_CHOICE_MAP = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
DRIVE_CONTENT_RESTRICTIONS_SUBFIELDS_CHOICE_MAP = {
|
DRIVE_CONTENT_RESTRICTIONS_SUBFIELDS_CHOICE_MAP = {
|
||||||
|
'ownerrestricted': 'ownerRestricted',
|
||||||
'readonly': 'readOnly',
|
'readonly': 'readOnly',
|
||||||
'reason': 'reason',
|
'reason': 'reason',
|
||||||
'restrictinguser': 'restructingUser',
|
'restrictinguser': 'restructingUser',
|
||||||
|
Reference in New Issue
Block a user