mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-04 21:01:36 +00:00
Compare commits
3 Commits
v7.02.04
...
20250104.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
782d57b02e | ||
|
|
0c6825fa12 | ||
|
|
6a82343668 |
@@ -7352,11 +7352,11 @@ gam <UserTypeEntity> print filters [labelidsonly] [todrive <ToDriveAttribute>*]
|
|||||||
# Users - Forms
|
# Users - Forms
|
||||||
|
|
||||||
gam <UserTypeEntity> create form
|
gam <UserTypeEntity> create form
|
||||||
title <String> [description <String>] [isquiz [<Boolean>]
|
title <String> [description <String>] [isquiz [<Boolean>]] [<JSONData>]
|
||||||
[drivefilename <DriveFileName>] [<DriveFileParentAttribute>]
|
[drivefilename <DriveFileName>] [<DriveFileParentAttribute>]
|
||||||
[(csv [todrive <ToDriveAttribute>*]) | returnidonly]
|
[(csv [todrive <ToDriveAttribute>*]) | returnidonly]
|
||||||
gam <UserTypeEntity> update form <DriveFileEntity>
|
gam <UserTypeEntity> update form <DriveFileEntity>
|
||||||
[title <String>] [description <String>] [isquiz [<Boolean>]
|
[title <String>] [description <String>] [isquiz [<Boolean>]] [<JSONData>]
|
||||||
|
|
||||||
gam <UserTypeEntity> print forms <DriveFileEntity> [todrive <ToDriveAttribute>*]
|
gam <UserTypeEntity> print forms <DriveFileEntity> [todrive <ToDriveAttribute>*]
|
||||||
(addcsvdata <FieldName> <String>)*
|
(addcsvdata <FieldName> <String>)*
|
||||||
|
|||||||
@@ -1,3 +1,18 @@
|
|||||||
|
7.02.06
|
||||||
|
|
||||||
|
Added option `<JSONData>` to `gam <UserTypeEntity> create|update form` that allows for
|
||||||
|
creation/modification of all fields in a form. `<JSONData>` is a list of form update requests.
|
||||||
|
|
||||||
|
* See: https://developers.google.com/forms/api/reference/rest/v1/forms/batchUpdate
|
||||||
|
|
||||||
|
7.02.05
|
||||||
|
|
||||||
|
Updated `gam [<UserTypeEntity>] show shareddriveacls ... formatjson` to not display this line
|
||||||
|
which interferes with the JSON output.
|
||||||
|
```
|
||||||
|
User: user@domain.com, Show N Shared Drives
|
||||||
|
```
|
||||||
|
|
||||||
7.02.04
|
7.02.04
|
||||||
|
|
||||||
Updated code to eliminate trap caused by bug introduced in 7.02.00 that occurs when an invalid domain or OU is specified.
|
Updated code to eliminate trap caused by bug introduced in 7.02.00 that occurs when an invalid domain or OU is specified.
|
||||||
|
|||||||
@@ -381,7 +381,7 @@ while true; do
|
|||||||
;;
|
;;
|
||||||
[Nn]*)
|
[Nn]*)
|
||||||
# config_cmd="config no_browser true"
|
# config_cmd="config no_browser true"
|
||||||
touch "$target_dir/gam/nobrowser.txt" > /dev/null 2>&1
|
touch "$target_dir/gam7/nobrowser.txt" > /dev/null 2>&1
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|||||||
@@ -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.02.04'
|
__version__ = '7.02.06'
|
||||||
__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
|
||||||
@@ -23171,8 +23171,8 @@ def printShowContactDelegates(users):
|
|||||||
continue
|
continue
|
||||||
jcount = len(delegates)
|
jcount = len(delegates)
|
||||||
if not csvPF:
|
if not csvPF:
|
||||||
entityPerformActionNumItems([Ent.USER, user], jcount, Ent.CONTACT_DELEGATE, i, count)
|
|
||||||
if not csvStyle:
|
if not csvStyle:
|
||||||
|
entityPerformActionNumItems([Ent.USER, user], jcount, Ent.CONTACT_DELEGATE, i, count)
|
||||||
Ind.Increment()
|
Ind.Increment()
|
||||||
j = 0
|
j = 0
|
||||||
for delegate in delegates:
|
for delegate in delegates:
|
||||||
@@ -65568,13 +65568,11 @@ def printShowSharedDrives(users, useDomainAdminAccess=False):
|
|||||||
else:
|
else:
|
||||||
matchedFeed = feed
|
matchedFeed = feed
|
||||||
jcount = len(matchedFeed)
|
jcount = len(matchedFeed)
|
||||||
|
if jcount == 0:
|
||||||
|
setSysExitRC(NO_ENTITIES_FOUND_RC)
|
||||||
if not csvPF:
|
if not csvPF:
|
||||||
if not FJQC.formatJSON:
|
if not FJQC.formatJSON:
|
||||||
entityPerformActionNumItems([Ent.USER, user], jcount, Ent.SHAREDDRIVE, i, count)
|
entityPerformActionNumItems([Ent.USER, user], jcount, Ent.SHAREDDRIVE, i, count)
|
||||||
if jcount == 0:
|
|
||||||
setSysExitRC(NO_ENTITIES_FOUND_RC)
|
|
||||||
else:
|
|
||||||
if not csvPF:
|
|
||||||
Ind.Increment()
|
Ind.Increment()
|
||||||
j = 0
|
j = 0
|
||||||
for shareddrive in matchedFeed:
|
for shareddrive in matchedFeed:
|
||||||
@@ -65651,13 +65649,11 @@ def doPrintShowOrgunitSharedDrives():
|
|||||||
customer=_getCustomersCustomerIdWithC(),
|
customer=_getCustomersCustomerIdWithC(),
|
||||||
filter="type == 'shared_drive'")
|
filter="type == 'shared_drive'")
|
||||||
jcount = len(sds)
|
jcount = len(sds)
|
||||||
|
if jcount == 0:
|
||||||
|
setSysExitRC(NO_ENTITIES_FOUND_RC)
|
||||||
if not csvPF:
|
if not csvPF:
|
||||||
if not FJQC.formatJSON:
|
if not FJQC.formatJSON:
|
||||||
entityPerformActionNumItems([Ent.ORGANIZATIONAL_UNIT, orgUnitPath], jcount, Ent.SHAREDDRIVE)
|
entityPerformActionNumItems([Ent.ORGANIZATIONAL_UNIT, orgUnitPath], jcount, Ent.SHAREDDRIVE)
|
||||||
if jcount == 0:
|
|
||||||
setSysExitRC(NO_ENTITIES_FOUND_RC)
|
|
||||||
else:
|
|
||||||
if not csvPF:
|
|
||||||
Ind.Increment()
|
Ind.Increment()
|
||||||
j = 0
|
j = 0
|
||||||
for shareddrive in sds:
|
for shareddrive in sds:
|
||||||
@@ -65758,7 +65754,7 @@ SHOW_NO_PERMISSIONS_DRIVES_CHOICE_MAP = {
|
|||||||
# [oneitemperrow] [maxitems <Integer>]
|
# [oneitemperrow] [maxitems <Integer>]
|
||||||
# [shownopermissionsdrives false|true|only]
|
# [shownopermissionsdrives false|true|only]
|
||||||
# [<DrivePermissionsFieldName>*|(fields <DrivePermissionsFieldNameList>)]
|
# [<DrivePermissionsFieldName>*|(fields <DrivePermissionsFieldNameList>)]
|
||||||
# [formatjsn]
|
# [formatjson]
|
||||||
def printShowSharedDriveACLs(users, useDomainAdminAccess=False):
|
def printShowSharedDriveACLs(users, useDomainAdminAccess=False):
|
||||||
def _printPermissionRow(baserow, permission):
|
def _printPermissionRow(baserow, permission):
|
||||||
row = baserow.copy()
|
row = baserow.copy()
|
||||||
@@ -65948,6 +65944,7 @@ def printShowSharedDriveACLs(users, useDomainAdminAccess=False):
|
|||||||
if jcount == 0:
|
if jcount == 0:
|
||||||
setSysExitRC(NO_ENTITIES_FOUND_RC)
|
setSysExitRC(NO_ENTITIES_FOUND_RC)
|
||||||
if not csvPF:
|
if not csvPF:
|
||||||
|
if not FJQC.formatJSON:
|
||||||
entityPerformActionNumItems([Ent.USER, user], jcount, Ent.SHAREDDRIVE, i, count)
|
entityPerformActionNumItems([Ent.USER, user], jcount, Ent.SHAREDDRIVE, i, count)
|
||||||
Ind.Increment()
|
Ind.Increment()
|
||||||
j = 0
|
j = 0
|
||||||
@@ -71987,7 +71984,8 @@ def updateFormRequestUpdateMasks(ubody):
|
|||||||
v['updateMask'] = ','.join(v['updateMask'])
|
v['updateMask'] = ','.join(v['updateMask'])
|
||||||
break
|
break
|
||||||
|
|
||||||
# gam <UserTypeEntity> create form title <String> [description <String>] [isquiz [<Boolean>]]
|
# gam <UserTypeEntity> create form
|
||||||
|
# title <String> [description <String>] [isquiz [<Boolean>]] [<JSONData>]
|
||||||
# [drivefilename <DriveFileName>] [<DriveFileParentAttribute>]
|
# [drivefilename <DriveFileName>] [<DriveFileParentAttribute>]
|
||||||
# [(csv [todrive <ToDriveAttribute>*]) | returnidonly]
|
# [(csv [todrive <ToDriveAttribute>*]) | returnidonly]
|
||||||
def createForm(users):
|
def createForm(users):
|
||||||
@@ -72006,6 +72004,9 @@ def createForm(users):
|
|||||||
updateFormInfoRequest(myarg, getString(Cmd.OB_STRING, minLen=0), ubody)
|
updateFormInfoRequest(myarg, getString(Cmd.OB_STRING, minLen=0), ubody)
|
||||||
elif myarg == 'isquiz':
|
elif myarg == 'isquiz':
|
||||||
updateFormSettingsRequest('isQuiz', getBoolean(), ubody)
|
updateFormSettingsRequest('isQuiz', getBoolean(), ubody)
|
||||||
|
elif myarg == 'json':
|
||||||
|
jsonData = getJSON([])
|
||||||
|
ubody['requests'].extend(jsonData.get('requests', []))
|
||||||
elif myarg == 'drivefilename':
|
elif myarg == 'drivefilename':
|
||||||
body['name'] = getString(Cmd.OB_DRIVE_FILE_NAME)
|
body['name'] = getString(Cmd.OB_DRIVE_FILE_NAME)
|
||||||
elif getDriveFileParentAttribute(myarg, parentParms):
|
elif getDriveFileParentAttribute(myarg, parentParms):
|
||||||
@@ -72068,7 +72069,8 @@ def createForm(users):
|
|||||||
if csvPF:
|
if csvPF:
|
||||||
csvPF.writeCSVfile('Forms')
|
csvPF.writeCSVfile('Forms')
|
||||||
|
|
||||||
# gam <UserTypeEntity> update form <DriveFileEntity> [title <String>] [description <String>] [isquiz [Boolean>]
|
# gam <UserTypeEntity> update form <DriveFileEntity>
|
||||||
|
# [title <String>] [description <String>] [isquiz [Boolean>]] [<JSONData>]
|
||||||
def updateForm(users):
|
def updateForm(users):
|
||||||
ubody = {'includeFormInResponse': False, 'requests': []}
|
ubody = {'includeFormInResponse': False, 'requests': []}
|
||||||
fileIdEntity = getDriveFileEntity()
|
fileIdEntity = getDriveFileEntity()
|
||||||
@@ -72080,6 +72082,9 @@ def updateForm(users):
|
|||||||
updateFormInfoRequest(myarg, getString(Cmd.OB_STRING, minLen=0), ubody)
|
updateFormInfoRequest(myarg, getString(Cmd.OB_STRING, minLen=0), ubody)
|
||||||
elif myarg == 'isquiz':
|
elif myarg == 'isquiz':
|
||||||
updateFormSettingsRequest('isQuiz', getBoolean(), ubody)
|
updateFormSettingsRequest('isQuiz', getBoolean(), ubody)
|
||||||
|
elif myarg == 'json':
|
||||||
|
jsonData = getJSON([])
|
||||||
|
ubody['requests'].extend(jsonData.get('requests', []))
|
||||||
else:
|
else:
|
||||||
unknownArgumentExit()
|
unknownArgumentExit()
|
||||||
updateFormRequestUpdateMasks(ubody)
|
updateFormRequestUpdateMasks(ubody)
|
||||||
|
|||||||
Reference in New Issue
Block a user