mirror of
https://github.com/GAM-team/GAM.git
synced 2025-07-10 14:43:34 +00:00
reason not valid woth readonly false; add contentrestrions to file field list (#1263)
This commit is contained in:
@ -3538,7 +3538,11 @@ def getDriveFileAttribute(i, body, parameters, myarg, update=False):
|
|||||||
sys.argv[i+2], f'gam <users> {operation} drivefile')
|
sys.argv[i+2], f'gam <users> {operation} drivefile')
|
||||||
i += 3
|
i += 3
|
||||||
if len(sys.argv) > i and sys.argv[i].lower() == 'reason':
|
if len(sys.argv) > i and sys.argv[i].lower() == 'reason':
|
||||||
|
if body['contentRestrictions'][0]['readOnly']:
|
||||||
body['contentRestrictions'][0]['reason'] = sys.argv[i+1]
|
body['contentRestrictions'][0]['reason'] = sys.argv[i+1]
|
||||||
|
else:
|
||||||
|
controlflow.invalid_argument_exit(
|
||||||
|
'reason', 'contentrestrictions readonly false')
|
||||||
i += 2
|
i += 2
|
||||||
else:
|
else:
|
||||||
controlflow.invalid_argument_exit(
|
controlflow.invalid_argument_exit(
|
||||||
|
@ -380,6 +380,7 @@ DRIVEFILE_FIELDS_CHOICES_MAP = {
|
|||||||
'appdatacontents': 'appDataContents',
|
'appdatacontents': 'appDataContents',
|
||||||
'cancomment': 'canComment',
|
'cancomment': 'canComment',
|
||||||
'canreadrevisions': 'canReadRevisions',
|
'canreadrevisions': 'canReadRevisions',
|
||||||
|
'contentrestrictions': 'contentRestrictions',
|
||||||
'copyable': 'copyable',
|
'copyable': 'copyable',
|
||||||
'copyrequireswriterpermission': 'copyRequiresWriterPermission',
|
'copyrequireswriterpermission': 'copyRequiresWriterPermission',
|
||||||
'createddate': 'createdDate',
|
'createddate': 'createdDate',
|
||||||
|
Reference in New Issue
Block a user