mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-03 20:31:35 +00:00
Updated gam print group-members|cigroup-members to include the email column when fields <MembersFieldNameList> did not include email.
Some checks failed
Build and test GAM / build (Win64, build, 10, VC-WIN64A, windows-2022) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 3, linux-aarch64, ubuntu-24.04-arm) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 4, linux-aarch64, ubuntu-22.04-arm) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 6, linux-aarch64, ubuntu-22.04-arm, yes) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 8, darwin64-arm64, macos-14) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 9, darwin64-arm64, macos-15) (push) Has been cancelled
Build and test GAM / build (x86_64, build, 1, linux-x86_64, ubuntu-22.04) (push) Has been cancelled
Build and test GAM / build (x86_64, build, 2, linux-x86_64, ubuntu-24.04) (push) Has been cancelled
Build and test GAM / build (x86_64, build, 5, linux-x86_64, ubuntu-22.04, yes) (push) Has been cancelled
Build and test GAM / build (x86_64, build, 7, darwin64-x86_64, macos-13) (push) Has been cancelled
Build and test GAM / build (x86_64, test, 11, ubuntu-24.04, 3.10) (push) Has been cancelled
Build and test GAM / build (x86_64, test, 12, ubuntu-24.04, 3.11) (push) Has been cancelled
Build and test GAM / build (x86_64, test, 13, ubuntu-24.04, 3.12) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Check for Google Root CA Updates / check-apis (push) Has been cancelled
Build and test GAM / merge (push) Has been cancelled
Build and test GAM / publish (push) Has been cancelled
Some checks failed
Build and test GAM / build (Win64, build, 10, VC-WIN64A, windows-2022) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 3, linux-aarch64, ubuntu-24.04-arm) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 4, linux-aarch64, ubuntu-22.04-arm) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 6, linux-aarch64, ubuntu-22.04-arm, yes) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 8, darwin64-arm64, macos-14) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 9, darwin64-arm64, macos-15) (push) Has been cancelled
Build and test GAM / build (x86_64, build, 1, linux-x86_64, ubuntu-22.04) (push) Has been cancelled
Build and test GAM / build (x86_64, build, 2, linux-x86_64, ubuntu-24.04) (push) Has been cancelled
Build and test GAM / build (x86_64, build, 5, linux-x86_64, ubuntu-22.04, yes) (push) Has been cancelled
Build and test GAM / build (x86_64, build, 7, darwin64-x86_64, macos-13) (push) Has been cancelled
Build and test GAM / build (x86_64, test, 11, ubuntu-24.04, 3.10) (push) Has been cancelled
Build and test GAM / build (x86_64, test, 12, ubuntu-24.04, 3.11) (push) Has been cancelled
Build and test GAM / build (x86_64, test, 13, ubuntu-24.04, 3.12) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Check for Google Root CA Updates / check-apis (push) Has been cancelled
Build and test GAM / merge (push) Has been cancelled
Build and test GAM / publish (push) Has been cancelled
This commit is contained in:
@@ -3997,13 +3997,14 @@ gam print cigroups [todrive <ToDriveAttribute>*]
|
|||||||
|
|
||||||
<CIGroupMembersFieldName> ::=
|
<CIGroupMembersFieldName> ::=
|
||||||
createtime
|
createtime
|
||||||
|
email|useremail|
|
||||||
expiretime|
|
expiretime|
|
||||||
memberkey|
|
memberkey|
|
||||||
name|
|
name|
|
||||||
role|
|
role|
|
||||||
type|
|
type|
|
||||||
updatetime|
|
updatetime
|
||||||
useremail
|
|
||||||
<CIGroupMembersFieldNameList> ::= "<CIGroupMembersFieldName>(,<CIGroupMembersFieldName>)*"
|
<CIGroupMembersFieldNameList> ::= "<CIGroupMembersFieldName>(,<CIGroupMembersFieldName>)*"
|
||||||
|
|
||||||
gam <UserTypeEntity> info cimember <GroupEntity>
|
gam <UserTypeEntity> info cimember <GroupEntity>
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
7.04.04
|
||||||
|
|
||||||
|
Updated `gam print group-members|cigroup-members` to include the `email` column
|
||||||
|
when `fields <MembersFieldNameList>` did not include `email`.
|
||||||
|
|
||||||
7.04.03
|
7.04.03
|
||||||
|
|
||||||
Added option `minimal|basic|full` to `gam print cigroup-members`:
|
Added option `minimal|basic|full` to `gam print cigroup-members`:
|
||||||
@@ -10,6 +15,8 @@ Added option `minimal|basic|full` to `gam show cigroup-members`:
|
|||||||
* `basic` - Fields displayed: type, role, email
|
* `basic` - Fields displayed: type, role, email
|
||||||
* `full` - Fields displayed: type, role, email, createTime, updateTime; this is the default
|
* `full` - Fields displayed: type, role, email, createTime, updateTime; this is the default
|
||||||
|
|
||||||
|
Upgraded `gam print cigroup-members ... recursive` to display sub-group email addresses rather than IDs.
|
||||||
|
|
||||||
7.04.02
|
7.04.02
|
||||||
|
|
||||||
Improved output formatting for the following commands:
|
Improved output formatting for the following commands:
|
||||||
|
|||||||
@@ -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.04.03'
|
__version__ = '7.04.04'
|
||||||
__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
|
||||||
@@ -7324,12 +7324,6 @@ def _getRawFields(requiredField=None):
|
|||||||
return rawFields
|
return rawFields
|
||||||
return f'{requiredField},{rawFields}'
|
return f'{requiredField},{rawFields}'
|
||||||
|
|
||||||
def _addInitialField(fieldsList, initialField):
|
|
||||||
if isinstance(initialField, list):
|
|
||||||
fieldsList.extend(initialField)
|
|
||||||
else:
|
|
||||||
fieldsList.append(initialField)
|
|
||||||
|
|
||||||
def CheckInputRowFilterHeaders(titlesList, rowFilter, rowDropFilter):
|
def CheckInputRowFilterHeaders(titlesList, rowFilter, rowDropFilter):
|
||||||
status = True
|
status = True
|
||||||
for filterVal in rowFilter:
|
for filterVal in rowFilter:
|
||||||
@@ -7744,6 +7738,12 @@ def RowFilterMatch(row, titlesList, rowFilter, rowFilterModeAll, rowDropFilter,
|
|||||||
# }
|
# }
|
||||||
# fieldsList is the list of API fields
|
# fieldsList is the list of API fields
|
||||||
def getFieldsList(myarg, fieldsChoiceMap, fieldsList, initialField=None, fieldsArg='fields', onlyFieldsArg=False):
|
def getFieldsList(myarg, fieldsChoiceMap, fieldsList, initialField=None, fieldsArg='fields', onlyFieldsArg=False):
|
||||||
|
def addInitialField():
|
||||||
|
if isinstance(initialField, list):
|
||||||
|
fieldsList.extend(initialField)
|
||||||
|
else:
|
||||||
|
fieldsList.append(initialField)
|
||||||
|
|
||||||
def addMappedFields(mappedFields):
|
def addMappedFields(mappedFields):
|
||||||
if isinstance(mappedFields, list):
|
if isinstance(mappedFields, list):
|
||||||
fieldsList.extend(mappedFields)
|
fieldsList.extend(mappedFields)
|
||||||
@@ -7752,11 +7752,11 @@ def getFieldsList(myarg, fieldsChoiceMap, fieldsList, initialField=None, fieldsA
|
|||||||
|
|
||||||
if not onlyFieldsArg and myarg in fieldsChoiceMap:
|
if not onlyFieldsArg and myarg in fieldsChoiceMap:
|
||||||
if not fieldsList and initialField is not None:
|
if not fieldsList and initialField is not None:
|
||||||
_addInitialField(fieldsList, initialField)
|
addInitialField()
|
||||||
addMappedFields(fieldsChoiceMap[myarg])
|
addMappedFields(fieldsChoiceMap[myarg])
|
||||||
elif myarg == fieldsArg:
|
elif myarg == fieldsArg:
|
||||||
if not fieldsList and initialField is not None:
|
if not fieldsList and initialField is not None:
|
||||||
_addInitialField(fieldsList, initialField)
|
addInitialField()
|
||||||
for field in _getFieldsList():
|
for field in _getFieldsList():
|
||||||
if field in fieldsChoiceMap:
|
if field in fieldsChoiceMap:
|
||||||
addMappedFields(fieldsChoiceMap[field])
|
addMappedFields(fieldsChoiceMap[field])
|
||||||
@@ -7933,14 +7933,21 @@ class CSVPrintFile():
|
|||||||
fieldsList.append(fields)
|
fieldsList.append(fields)
|
||||||
self.AddTitles(fields.replace('.', GC.Values[GC.CSV_OUTPUT_SUBFIELD_DELIMITER]))
|
self.AddTitles(fields.replace('.', GC.Values[GC.CSV_OUTPUT_SUBFIELD_DELIMITER]))
|
||||||
|
|
||||||
|
def addInitialField(self, initialField, fieldsChoiceMap, fieldsList):
|
||||||
|
if isinstance(initialField, list):
|
||||||
|
for field in initialField:
|
||||||
|
self.AddField(field, fieldsChoiceMap, fieldsList)
|
||||||
|
else:
|
||||||
|
self.AddField(initialField, fieldsChoiceMap, fieldsList)
|
||||||
|
|
||||||
def GetFieldsListTitles(self, fieldName, fieldsChoiceMap, fieldsList, initialField=None):
|
def GetFieldsListTitles(self, fieldName, fieldsChoiceMap, fieldsList, initialField=None):
|
||||||
if fieldName in fieldsChoiceMap:
|
if fieldName in fieldsChoiceMap:
|
||||||
if not fieldsList and initialField is not None:
|
if not fieldsList and initialField is not None:
|
||||||
_addInitialField(fieldsList, initialField)
|
self.addInitialField(initialField, fieldsChoiceMap, fieldsList)
|
||||||
self.AddField(fieldName, fieldsChoiceMap, fieldsList)
|
self.AddField(fieldName, fieldsChoiceMap, fieldsList)
|
||||||
elif fieldName == 'fields':
|
elif fieldName == 'fields':
|
||||||
if not fieldsList and initialField is not None:
|
if not fieldsList and initialField is not None:
|
||||||
_addInitialField(fieldsList, initialField)
|
self.addInitialField(initialField, fieldsChoiceMap, fieldsList)
|
||||||
for field in _getFieldsList():
|
for field in _getFieldsList():
|
||||||
if field in fieldsChoiceMap:
|
if field in fieldsChoiceMap:
|
||||||
self.AddField(field, fieldsChoiceMap, fieldsList)
|
self.AddField(field, fieldsChoiceMap, fieldsList)
|
||||||
@@ -34206,7 +34213,7 @@ def doPrintGroupMembers():
|
|||||||
pass
|
pass
|
||||||
elif getMemberMatchOptions(myarg, memberOptions):
|
elif getMemberMatchOptions(myarg, memberOptions):
|
||||||
pass
|
pass
|
||||||
elif csvPF.GetFieldsListTitles(myarg, GROUPMEMBERS_FIELDS_CHOICE_MAP, fieldsList):
|
elif csvPF.GetFieldsListTitles(myarg, GROUPMEMBERS_FIELDS_CHOICE_MAP, fieldsList, initialField='email'):
|
||||||
pass
|
pass
|
||||||
elif myarg == 'membernames':
|
elif myarg == 'membernames':
|
||||||
memberOptions[MEMBEROPTION_MEMBERNAMES] = True
|
memberOptions[MEMBEROPTION_MEMBERNAMES] = True
|
||||||
@@ -36223,6 +36230,7 @@ CIGROUPMEMBERS_FIELDS_CHOICE_MAP = {
|
|||||||
'createtime': 'createTime',
|
'createtime': 'createTime',
|
||||||
'delivery': 'deliverySetting',
|
'delivery': 'deliverySetting',
|
||||||
'deliverysettings': 'deliverySetting',
|
'deliverysettings': 'deliverySetting',
|
||||||
|
'email': 'preferredMemberKey',
|
||||||
'expiretime': 'expireTime',
|
'expiretime': 'expireTime',
|
||||||
'id': 'name',
|
'id': 'name',
|
||||||
'memberkey': 'preferredMemberKey',
|
'memberkey': 'preferredMemberKey',
|
||||||
@@ -36309,7 +36317,7 @@ def doPrintCIGroupMembers():
|
|||||||
pass
|
pass
|
||||||
elif getMemberMatchOptions(myarg, memberOptions):
|
elif getMemberMatchOptions(myarg, memberOptions):
|
||||||
pass
|
pass
|
||||||
elif getFieldsList(myarg, CIGROUPMEMBERS_FIELDS_CHOICE_MAP, fieldsList):
|
elif getFieldsList(myarg, CIGROUPMEMBERS_FIELDS_CHOICE_MAP, fieldsList, initialField='preferredMemberKey'):
|
||||||
pass
|
pass
|
||||||
elif myarg == 'noduplicates':
|
elif myarg == 'noduplicates':
|
||||||
memberOptions[MEMBEROPTION_NODUPLICATES] = True
|
memberOptions[MEMBEROPTION_NODUPLICATES] = True
|
||||||
|
|||||||
Reference in New Issue
Block a user