mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-28 01:41:36 +00:00
Merge branch 'main' of github.com:jay0lee/GAM
This commit is contained in:
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
@@ -12,13 +12,13 @@ defaults:
|
||||
working-directory: src
|
||||
|
||||
env:
|
||||
BUILD_PYTHON_VERSION: "3.10.0"
|
||||
MIN_PYTHON_VERSION: "3.10.0"
|
||||
BUILD_PYTHON_VERSION: "3.10.1"
|
||||
MIN_PYTHON_VERSION: "3.10.1"
|
||||
BUILD_OPENSSL_VERSION: "3.0.0"
|
||||
MIN_OPENSSL_VERSION: "1.1.1l"
|
||||
PATCHELF_VERSION: "0.13"
|
||||
# PYINSTALLER_VERSION can be full commit hash or version like v4.20
|
||||
PYINSTALLER_VERSION: "41842f5ad31dd33d7ba4ae03daace2287c80dcb7"
|
||||
PYINSTALLER_VERSION: "86eeca8b4ba8012ab2df19ca206cafbe263b6a81"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -92,7 +92,7 @@ jobs:
|
||||
path: |
|
||||
~/python
|
||||
~/ssl
|
||||
key: ${{ matrix.os }}-${{ matrix.jid }}-20211124
|
||||
key: ${{ matrix.os }}-${{ matrix.jid }}-20211207
|
||||
|
||||
- name: Set env variables
|
||||
env:
|
||||
|
||||
@@ -207,8 +207,9 @@ If an item contains spaces, it should be surrounded by ".
|
||||
<Namespace> ::= <String>
|
||||
<NotificationID> ::= <String>
|
||||
<NumberOfSeats> ::= <Number>
|
||||
<OrgUnitID> ::= <String>
|
||||
<OrgUnitID> ::= id:<String>
|
||||
<OrgUnitPath> ::= /|(/<String)+
|
||||
<OrgUnitItem> ::= <OrgUnitID>|<OrgUnitPath>
|
||||
<ParameterKey> ::= <String>
|
||||
<ParameterValue> ::= <String>
|
||||
<Password> ::= <String>
|
||||
@@ -1477,7 +1478,8 @@ The first column will always be primaryEmail; the remaining field names will be
|
||||
otherwise, the remaining field names will appear in the order specified.
|
||||
|
||||
gam print users [todrive]
|
||||
([domain <DomainName>] [(query <QueryUser>)|(queries <QueryUserList>)] [deleted_only|only_deleted])
|
||||
([domain <DomainName>] [(query <QueryUser>)|(queries <QueryUserList>)]
|
||||
[limittoou <OrgUnitPath>] [deleted_only|only_deleted])
|
||||
[groups] [license|licenses|licence|licences] [emailpart|emailparts|username]
|
||||
[orderby <UserOrderByFieldName> [ascending|descending]] [userview]
|
||||
[allfields|basic|full | ((<UserFieldName>* | fields <UserFieldNameList>) [schemas|custom all|<SchemaNameList>])]
|
||||
|
||||
@@ -9671,6 +9671,7 @@ def doPrintUsers():
|
||||
customFieldMask = None
|
||||
sortHeaders = getGroupFeed = getLicenseFeed = email_parts = False
|
||||
viewType = deleted_only = orderBy = sortOrder = None
|
||||
orgUnitPath = orgUnitPathLower = None
|
||||
groupDelimiter = ' '
|
||||
licenseDelimiter = ','
|
||||
i = 3
|
||||
@@ -9735,6 +9736,10 @@ def doPrintUsers():
|
||||
elif myarg in ['query', 'queries']:
|
||||
queries = getQueries(myarg, sys.argv[i + 1])
|
||||
i += 2
|
||||
elif myarg == 'limittoou':
|
||||
orgUnitPath = gapi_directory_orgunits.getOrgUnitItem(sys.argv[i + 1], pathOnly=True)
|
||||
orgUnitPathLower = orgUnitPath.lower()
|
||||
i += 2
|
||||
elif myarg in USER_ARGUMENT_TO_PROPERTY_MAP:
|
||||
if not fieldsList:
|
||||
fieldsList = [
|
||||
@@ -9770,10 +9775,21 @@ def doPrintUsers():
|
||||
else:
|
||||
controlflow.invalid_argument_exit(sys.argv[i], 'gam print users')
|
||||
if fieldsList:
|
||||
if orgUnitPath is not None:
|
||||
fieldsList.append('orgUnitPath')
|
||||
fields = f'nextPageToken,users({",".join(set(fieldsList)).replace(".", "/")})'
|
||||
else:
|
||||
fields = None
|
||||
for query in queries:
|
||||
if orgUnitPath is not None:
|
||||
if query is not None and query.find(orgUnitPath) == -1:
|
||||
query += f" orgUnitPath='{orgUnitPath}'"
|
||||
else:
|
||||
if query is None:
|
||||
query = ''
|
||||
else:
|
||||
query += ' '
|
||||
query += f"orgUnitPath='{orgUnitPath}'"
|
||||
printGettingAllItems('Users', query)
|
||||
page_message = gapi.got_total_items_first_last_msg('Users')
|
||||
all_users = gapi.get_all_pages(cd.users(),
|
||||
@@ -9792,13 +9808,14 @@ def doPrintUsers():
|
||||
projection=projection,
|
||||
customFieldMask=customFieldMask)
|
||||
for user in all_users:
|
||||
if email_parts and ('primaryEmail' in user):
|
||||
user_email = user['primaryEmail']
|
||||
if user_email.find('@') != -1:
|
||||
user['primaryEmailLocal'], user[
|
||||
'primaryEmailDomain'] = splitEmailAddress(user_email)
|
||||
display.add_row_titles_to_csv_file(utils.flatten_json(user),
|
||||
csvRows, titles)
|
||||
if orgUnitPathLower is None or orgUnitPathLower == user.get('orgUnitPath', '').lower():
|
||||
if email_parts and ('primaryEmail' in user):
|
||||
user_email = user['primaryEmail']
|
||||
if user_email.find('@') != -1:
|
||||
user['primaryEmailLocal'], user[
|
||||
'primaryEmailDomain'] = splitEmailAddress(user_email)
|
||||
display.add_row_titles_to_csv_file(utils.flatten_json(user),
|
||||
csvRows, titles)
|
||||
if sortHeaders:
|
||||
display.sort_csv_titles([
|
||||
'primaryEmail',
|
||||
|
||||
Reference in New Issue
Block a user