mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-28 09:51:36 +00:00
Added option addcsvdata <FieldName> <String> to gam <UserTypeEntity> print teamdriveacls
Some checks are pending
Build and test GAM / build (Win64, build, 8, VC-WIN64A, windows-2022) (push) Waiting to run
Build and test GAM / build (aarch64, build, 2, linux-aarch64, [self-hosted linux arm64]) (push) Waiting to run
Build and test GAM / build (aarch64, build, 4, linux-aarch64, [self-hosted linux arm64], yes) (push) Waiting to run
Build and test GAM / build (aarch64, build, 6, darwin64-arm64, macos-14) (push) Waiting to run
Build and test GAM / build (universal2, build, 7, darwin64-arm64 darwin64-x86_64, macos-14) (push) Waiting to run
Build and test GAM / build (x86_64, build, 1, linux-x86_64, ubuntu-20.04) (push) Waiting to run
Build and test GAM / build (x86_64, build, 3, linux-x86_64, ubuntu-20.04, yes) (push) Waiting to run
Build and test GAM / build (x86_64, build, 5, darwin64-x86_64, macos-12) (push) Waiting to run
Build and test GAM / build (x86_64, test, 10, ubuntu-22.04, 3.9) (push) Waiting to run
Build and test GAM / build (x86_64, test, 11, ubuntu-22.04, 3.10) (push) Waiting to run
Build and test GAM / build (x86_64, test, 12, ubuntu-22.04, 3.11) (push) Waiting to run
Build and test GAM / build (x86_64, test, 9, ubuntu-22.04, 3.8) (push) Waiting to run
Build and test GAM / merge (push) Blocked by required conditions
Build and test GAM / publish (push) Blocked by required conditions
CodeQL / Analyze (python) (push) Waiting to run
Check for Google Root CA Updates / check-apis (push) Waiting to run
Some checks are pending
Build and test GAM / build (Win64, build, 8, VC-WIN64A, windows-2022) (push) Waiting to run
Build and test GAM / build (aarch64, build, 2, linux-aarch64, [self-hosted linux arm64]) (push) Waiting to run
Build and test GAM / build (aarch64, build, 4, linux-aarch64, [self-hosted linux arm64], yes) (push) Waiting to run
Build and test GAM / build (aarch64, build, 6, darwin64-arm64, macos-14) (push) Waiting to run
Build and test GAM / build (universal2, build, 7, darwin64-arm64 darwin64-x86_64, macos-14) (push) Waiting to run
Build and test GAM / build (x86_64, build, 1, linux-x86_64, ubuntu-20.04) (push) Waiting to run
Build and test GAM / build (x86_64, build, 3, linux-x86_64, ubuntu-20.04, yes) (push) Waiting to run
Build and test GAM / build (x86_64, build, 5, darwin64-x86_64, macos-12) (push) Waiting to run
Build and test GAM / build (x86_64, test, 10, ubuntu-22.04, 3.9) (push) Waiting to run
Build and test GAM / build (x86_64, test, 11, ubuntu-22.04, 3.10) (push) Waiting to run
Build and test GAM / build (x86_64, test, 12, ubuntu-22.04, 3.11) (push) Waiting to run
Build and test GAM / build (x86_64, test, 9, ubuntu-22.04, 3.8) (push) Waiting to run
Build and test GAM / merge (push) Blocked by required conditions
Build and test GAM / publish (push) Blocked by required conditions
CodeQL / Analyze (python) (push) Waiting to run
Check for Google Root CA Updates / check-apis (push) Waiting to run
This commit is contained in:
@@ -16854,7 +16854,7 @@ def doPrintShowDataTransfers():
|
||||
status = getChoice(DATA_TRANSFER_STATUS_MAP, mapChoice=True)
|
||||
elif myarg == 'delimiter':
|
||||
delimiter = getCharacter()
|
||||
elif myarg == 'addcsvdata':
|
||||
elif csvPF and myarg == 'addcsvdata':
|
||||
k = getString(Cmd.OB_STRING)
|
||||
addCSVData[k] = getString(Cmd.OB_STRING, minLen=0)
|
||||
else:
|
||||
@@ -55134,7 +55134,6 @@ def _showComment(comment, stripPhotoLinks, timeObjects, i=0, count=0, FJQC=None)
|
||||
# [showdeleted] [start <Date>|<Time>] [countsonly]
|
||||
# [fields <CommentsFieldNameList>] [showphotolinks]
|
||||
# [countsonly]
|
||||
# (addcsvdata <FieldName> <String>)*
|
||||
# [formatjson]
|
||||
# gam <UserTypeEntity> print filecomments <DriveFileEntity> [todrive <ToDriveAttribute>*]
|
||||
# [showdeleted] [start <Date>|<Time>]
|
||||
@@ -55180,7 +55179,7 @@ def printShowFileComments(users):
|
||||
stripPhotoLinks = False
|
||||
elif myarg == 'fields':
|
||||
_getCommentFields(fieldsList)
|
||||
elif myarg == 'addcsvdata':
|
||||
elif csvPF and myarg == 'addcsvdata':
|
||||
k = getString(Cmd.OB_STRING)
|
||||
addCSVData[k] = getString(Cmd.OB_STRING, minLen=0)
|
||||
elif myarg == 'countsonly':
|
||||
@@ -64179,6 +64178,7 @@ SHOW_NO_PERMISSIONS_DRIVES_CHOICE_MAP = {
|
||||
# [oneitemperrow] [maxitems <Integer>]
|
||||
# [shownopermissionsdrives false|true|only]
|
||||
# [<DrivePermissionsFieldName>*|(fields <DrivePermissionsFieldNameList>)]
|
||||
# (addcsvdata <FieldName> <String>)*
|
||||
# [formatjson [quotechar <Character>]]
|
||||
# gam [<UserTypeEntity>] show shareddriveacls
|
||||
# [asadmin] [shareddriveadminquery|query <QuerySharedDrive>]
|
||||
@@ -64210,6 +64210,7 @@ def printShowSharedDriveACLs(users, useDomainAdminAccess=False):
|
||||
cd = emailAddress = orgUnitId = query = matchPattern = permtype = None
|
||||
PM = PermissionMatch()
|
||||
maxItems = 0
|
||||
addCSVData = {}
|
||||
while Cmd.ArgumentsRemaining():
|
||||
myarg = getArgument()
|
||||
if csvPF and myarg == 'todrive':
|
||||
@@ -64248,6 +64249,9 @@ def printShowSharedDriveACLs(users, useDomainAdminAccess=False):
|
||||
pmselect = True
|
||||
elif myarg == 'shownopermissionsdrives':
|
||||
showNoPermissionsDrives = getChoice(SHOW_NO_PERMISSIONS_DRIVES_CHOICE_MAP, mapChoice=True)
|
||||
elif csvPF and myarg == 'addcsvdata':
|
||||
k = getString(Cmd.OB_STRING)
|
||||
addCSVData[k] = getString(Cmd.OB_STRING, minLen=0)
|
||||
else:
|
||||
FJQC.GetFormatJSONQuoteChar(myarg, True)
|
||||
if query and not useDomainAdminAccess:
|
||||
@@ -64279,6 +64283,11 @@ def printShowSharedDriveACLs(users, useDomainAdminAccess=False):
|
||||
groupsSet = {group['email'] for group in groups}
|
||||
else:
|
||||
checkGroups = False
|
||||
if csvPF and addCSVData:
|
||||
csvPF.AddTitles(sorted(addCSVData.keys()))
|
||||
if FJQC.formatJSON:
|
||||
csvPF.AddJSONTitles(sorted(addCSVData.keys()))
|
||||
csvPF.MoveJSONTitlesToEnd(['JSON'])
|
||||
i, count, users = getEntityArgument(users)
|
||||
for user in users:
|
||||
i += 1
|
||||
@@ -64388,6 +64397,8 @@ def printShowSharedDriveACLs(users, useDomainAdminAccess=False):
|
||||
if oneItemPerRow:
|
||||
for shareddrive in matchFeed:
|
||||
baserow = {'User': user, 'id': shareddrive['id'], 'name': shareddrive['name'], 'createdTime': shareddrive['createdTime']}
|
||||
if addCSVData:
|
||||
baserow.update(addCSVData)
|
||||
if shareddrive['permissions']:
|
||||
for permission in shareddrive['permissions']:
|
||||
_mapDrivePermissionNames(permission)
|
||||
@@ -64407,6 +64418,8 @@ def printShowSharedDriveACLs(users, useDomainAdminAccess=False):
|
||||
else:
|
||||
for shareddrive in matchFeed:
|
||||
baserow = {'User': user, 'id': shareddrive['id'], 'name': shareddrive['name'], 'createdTime': shareddrive['createdTime']}
|
||||
if addCSVData:
|
||||
baserow.update(addCSVData)
|
||||
row = baserow.copy()
|
||||
if shareddrive['permissions']:
|
||||
for permission in shareddrive['permissions']:
|
||||
@@ -69441,7 +69454,7 @@ def printShowMessagesThreads(users, entityType):
|
||||
dateHeaderConvertTimezone = getBoolean()
|
||||
if not dateHeaderFormat:
|
||||
dateHeaderFormat = RFC2822_TIME_FORMAT
|
||||
elif myarg == 'addcsvdata':
|
||||
elif csvPF and myarg == 'addcsvdata':
|
||||
k = getString(Cmd.OB_STRING)
|
||||
addCSVData[k] = getString(Cmd.OB_STRING, minLen=0)
|
||||
else:
|
||||
@@ -70453,7 +70466,7 @@ def printShowForms(users):
|
||||
myarg = getArgument()
|
||||
if csvPF and myarg == 'todrive':
|
||||
csvPF.GetTodriveParameters()
|
||||
elif myarg == 'addcsvdata':
|
||||
elif csvPF and myarg == 'addcsvdata':
|
||||
k = getString(Cmd.OB_STRING)
|
||||
addCSVData[k] = getString(Cmd.OB_STRING, minLen=0)
|
||||
else:
|
||||
@@ -70537,7 +70550,7 @@ def printShowFormResponses(users):
|
||||
frfilter = getString(Cmd.OB_STRING)
|
||||
elif myarg == 'countsonly':
|
||||
countsOnly = True
|
||||
elif myarg == 'addcsvdata':
|
||||
elif csvPF and myarg == 'addcsvdata':
|
||||
k = getString(Cmd.OB_STRING)
|
||||
addCSVData[k] = getString(Cmd.OB_STRING, minLen=0)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user