gam7 7.14.3__py3-none-any.whl → 7.14.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of gam7 might be problematic. Click here for more details.
- gam/__init__.py +16 -10
- gam/gamlib/glgapi.py +4 -0
- {gam7-7.14.3.dist-info → gam7-7.14.4.dist-info}/METADATA +1 -1
- {gam7-7.14.3.dist-info → gam7-7.14.4.dist-info}/RECORD +7 -7
- {gam7-7.14.3.dist-info → gam7-7.14.4.dist-info}/WHEEL +0 -0
- {gam7-7.14.3.dist-info → gam7-7.14.4.dist-info}/entry_points.txt +0 -0
- {gam7-7.14.3.dist-info → gam7-7.14.4.dist-info}/licenses/LICENSE +0 -0
gam/__init__.py
CHANGED
|
@@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki
|
|
|
25
25
|
"""
|
|
26
26
|
|
|
27
27
|
__author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
|
|
28
|
-
__version__ = '7.14.
|
|
28
|
+
__version__ = '7.14.04'
|
|
29
29
|
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
|
30
30
|
|
|
31
31
|
#pylint: disable=wrong-import-position
|
|
@@ -36832,11 +36832,11 @@ def doPrintCIGroups():
|
|
|
36832
36832
|
|
|
36833
36833
|
ci = buildGAPIObject(API.CLOUDIDENTITY_GROUPS)
|
|
36834
36834
|
setTrueCustomerId()
|
|
36835
|
+
parent = f'customers/{GC.Values[GC.CUSTOMER_ID]}'
|
|
36835
36836
|
delimiter = GC.Values[GC.CSV_OUTPUT_FIELD_DELIMITER]
|
|
36836
36837
|
memberRestrictions = sortHeaders = False
|
|
36837
36838
|
memberDisplayOptions = initPGGroupMemberDisplayOptions()
|
|
36838
36839
|
pageSize = 500
|
|
36839
|
-
parent = f'customers/{GC.Values[GC.CUSTOMER_ID]}'
|
|
36840
36840
|
groupFieldsLists = {'ci': ['groupKey']}
|
|
36841
36841
|
csvPF = CSVPrintFile(['email'])
|
|
36842
36842
|
FJQC = FormatJSONQuoteChar(csvPF)
|
|
@@ -36854,7 +36854,7 @@ def doPrintCIGroups():
|
|
|
36854
36854
|
showOwnedBy = convertUIDtoEmailAddress(getEmailAddress(), emailTypes=['user'])
|
|
36855
36855
|
elif myarg in {'cimember', 'enterprisemember', 'ciowner'}:
|
|
36856
36856
|
emailAddress = convertUIDtoEmailAddress(getEmailAddress(), emailTypes=['user', 'group'])
|
|
36857
|
-
memberQuery = f"member_key_id == '{emailAddress}' && '{CIGROUP_DISCUSSION_FORUM_LABEL}' in labels"
|
|
36857
|
+
memberQuery = f"member_key_id == '{emailAddress}' && '{CIGROUP_DISCUSSION_FORUM_LABEL}' in labels && parent == '{parent}'"
|
|
36858
36858
|
entitySelection = None
|
|
36859
36859
|
if myarg == 'ciowner':
|
|
36860
36860
|
showOwnedBy = emailAddress
|
|
@@ -37256,6 +37256,7 @@ def _getCIListGroupMembersArgs(listView):
|
|
|
37256
37256
|
def doPrintCIGroupMembers():
|
|
37257
37257
|
ci = buildGAPIObject(API.CLOUDIDENTITY_GROUPS)
|
|
37258
37258
|
setTrueCustomerId()
|
|
37259
|
+
parent = f'customers/{GC.Values[GC.CUSTOMER_ID]}'
|
|
37259
37260
|
memberOptions = initMemberOptions()
|
|
37260
37261
|
memberDisplayOptions = initIPSGMGroupMemberDisplayOptions()
|
|
37261
37262
|
groupColumn = True
|
|
@@ -37277,7 +37278,7 @@ def doPrintCIGroupMembers():
|
|
|
37277
37278
|
showOwnedBy = convertUIDtoEmailAddress(getEmailAddress(), emailTypes=['user'])
|
|
37278
37279
|
elif myarg in {'cimember', 'enterprisemember', 'ciowner'}:
|
|
37279
37280
|
emailAddress = convertUIDtoEmailAddress(getEmailAddress(), emailTypes=['user', 'group'])
|
|
37280
|
-
query = f"member_key_id == '{emailAddress}' && '{CIGROUP_DISCUSSION_FORUM_LABEL}' in labels"
|
|
37281
|
+
query = f"member_key_id == '{emailAddress}' && '{CIGROUP_DISCUSSION_FORUM_LABEL}' in labels && parent == '{parent}'"
|
|
37281
37282
|
entityList = None
|
|
37282
37283
|
if myarg == 'ciowner':
|
|
37283
37284
|
showOwnedBy = emailAddress
|
|
@@ -37479,6 +37480,7 @@ def doShowCIGroupMembers():
|
|
|
37479
37480
|
|
|
37480
37481
|
ci = buildGAPIObject(API.CLOUDIDENTITY_GROUPS)
|
|
37481
37482
|
setTrueCustomerId()
|
|
37483
|
+
parent = f'customers/{GC.Values[GC.CUSTOMER_ID]}'
|
|
37482
37484
|
subTitle = f'{Msg.ALL} {Ent.Plural(Ent.CLOUD_IDENTITY_GROUP)}'
|
|
37483
37485
|
groupFieldsLists = {'ci': ['groupKey', 'name']}
|
|
37484
37486
|
entityList = query = showOwnedBy = None
|
|
@@ -37496,7 +37498,7 @@ def doShowCIGroupMembers():
|
|
|
37496
37498
|
showOwnedBy = convertUIDtoEmailAddress(getEmailAddress(), emailTypes=['user'])
|
|
37497
37499
|
elif myarg in {'cimember', 'enterprisemember', 'ciowner'}:
|
|
37498
37500
|
emailAddress = convertUIDtoEmailAddress(getEmailAddress(), emailTypes=['user', 'group'])
|
|
37499
|
-
query = f"member_key_id == '{emailAddress}' && '{CIGROUP_DISCUSSION_FORUM_LABEL}' in labels"
|
|
37501
|
+
query = f"member_key_id == '{emailAddress}' && '{CIGROUP_DISCUSSION_FORUM_LABEL}' in labels parent == '{parent}'"
|
|
37500
37502
|
entityList = None
|
|
37501
37503
|
if myarg == 'ciowner':
|
|
37502
37504
|
showOwnedBy = emailAddress
|
|
@@ -44425,7 +44427,7 @@ def updateUsers(entityList):
|
|
|
44425
44427
|
try:
|
|
44426
44428
|
result = callGAPI(cd.users(), 'update',
|
|
44427
44429
|
throwReasons=[GAPI.CONDITION_NOT_MET, GAPI.USER_NOT_FOUND, GAPI.DOMAIN_NOT_FOUND,
|
|
44428
|
-
GAPI.FORBIDDEN, GAPI.BAD_REQUEST,
|
|
44430
|
+
GAPI.FORBIDDEN, GAPI.BAD_REQUEST, GAPI.ADMIN_CANNOT_UNSUSPEND,
|
|
44429
44431
|
GAPI.INVALID, GAPI.INVALID_INPUT, GAPI.INVALID_PARAMETER,
|
|
44430
44432
|
GAPI.INVALID_ORGUNIT, GAPI.INVALID_SCHEMA_VALUE, GAPI.DUPLICATE,
|
|
44431
44433
|
GAPI.INSUFFICIENT_ARCHIVED_USER_LICENSES, GAPI.CONFLICT],
|
|
@@ -44487,7 +44489,8 @@ def updateUsers(entityList):
|
|
|
44487
44489
|
entityActionFailedWarning([Ent.USER, user, Ent.USER, body['primaryEmail']], str(e), i, count)
|
|
44488
44490
|
except GAPI.invalidOrgunit:
|
|
44489
44491
|
entityActionFailedWarning([Ent.USER, user], Msg.INVALID_ORGUNIT, i, count)
|
|
44490
|
-
except (GAPI.resourceNotFound, GAPI.domainNotFound, GAPI.domainCannotUseApis,
|
|
44492
|
+
except (GAPI.resourceNotFound, GAPI.domainNotFound, GAPI.domainCannotUseApis,
|
|
44493
|
+
GAPI.forbidden, GAPI.badRequest, GAPI.adminCannotUnsuspend,
|
|
44491
44494
|
GAPI.invalid, GAPI.invalidInput, GAPI.invalidParameter, GAPI.insufficientArchivedUserLicenses,
|
|
44492
44495
|
GAPI.conflict, GAPI.badRequest, GAPI.backendError, GAPI.systemError, GAPI.conditionNotMet) as e:
|
|
44493
44496
|
entityActionFailedWarning([Ent.USER, user], str(e), i, count)
|
|
@@ -44655,12 +44658,14 @@ def suspendUnsuspendUsers(entityList):
|
|
|
44655
44658
|
try:
|
|
44656
44659
|
callGAPI(cd.users(), 'update',
|
|
44657
44660
|
throwReasons=[GAPI.USER_NOT_FOUND, GAPI.DOMAIN_NOT_FOUND,
|
|
44658
|
-
GAPI.DOMAIN_CANNOT_USE_APIS, GAPI.FORBIDDEN, GAPI.BAD_REQUEST
|
|
44661
|
+
GAPI.DOMAIN_CANNOT_USE_APIS, GAPI.FORBIDDEN, GAPI.BAD_REQUEST,
|
|
44662
|
+
GAPI.ADMIN_CANNOT_UNSUSPEND],
|
|
44659
44663
|
userKey=user, body=body)
|
|
44660
44664
|
entityActionPerformed([Ent.USER, user], i, count)
|
|
44661
44665
|
except GAPI.userNotFound:
|
|
44662
44666
|
entityUnknownWarning(Ent.USER, user, i, count)
|
|
44663
|
-
except (GAPI.domainNotFound, GAPI.domainCannotUseApis, GAPI.forbidden,
|
|
44667
|
+
except (GAPI.domainNotFound, GAPI.domainCannotUseApis, GAPI.forbidden,
|
|
44668
|
+
GAPI.badRequest, GAPI.adminCannotUnsuspend) as e:
|
|
44664
44669
|
entityActionFailedWarning([Ent.USER, user], str(e), i, count)
|
|
44665
44670
|
|
|
44666
44671
|
# gam suspend users <UserTypeEntity> [noactionifalias]
|
|
@@ -45044,6 +45049,7 @@ def infoUsers(entityList):
|
|
|
45044
45049
|
|
|
45045
45050
|
cd = buildGAPIObject(API.DIRECTORY)
|
|
45046
45051
|
ci = None
|
|
45052
|
+
setTrueCustomerId()
|
|
45047
45053
|
getAliases = getBuildingNames = getCIGroupsTree = getGroups = getLicenses = getSchemas = not GC.Values[GC.QUICK_INFO_USER]
|
|
45048
45054
|
getGroupsTree = False
|
|
45049
45055
|
FJQC = FormatJSONQuoteChar()
|
|
@@ -49545,7 +49551,7 @@ def doCourseAddItems(courseIdList, getEntityListArg):
|
|
|
49545
49551
|
addItems = getStringReturnInList(Cmd.OB_COURSE_ALIAS)
|
|
49546
49552
|
elif addType == Ent.COURSE_TOPIC:
|
|
49547
49553
|
addItems = getStringReturnInList(Cmd.OB_COURSE_TOPIC)
|
|
49548
|
-
else: # addType == Ent.COURSE_ANNOUNCEMENT:
|
|
49554
|
+
else: #elif addType == Ent.COURSE_ANNOUNCEMENT:
|
|
49549
49555
|
addItems = [getCourseAnnouncement(True)]
|
|
49550
49556
|
courseParticipantLists = None
|
|
49551
49557
|
else:
|
gam/gamlib/glgapi.py
CHANGED
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
ABORTED = 'aborted'
|
|
24
24
|
ABUSIVE_CONTENT_RESTRICTION = 'abusiveContentRestriction'
|
|
25
25
|
ACCESS_NOT_CONFIGURED = 'accessNotConfigured'
|
|
26
|
+
ADMIN_CANNOT_UNSUSPEND = 'adminCannotUnsuspend'
|
|
26
27
|
ALREADY_EXISTS = 'alreadyExists'
|
|
27
28
|
APPLY_LABEL_FORBIDDEN = 'applyLabelForbidden'
|
|
28
29
|
AUTH_ERROR = 'authError'
|
|
@@ -368,6 +369,8 @@ class abusiveContentRestriction(Exception):
|
|
|
368
369
|
pass
|
|
369
370
|
class accessNotConfigured(Exception):
|
|
370
371
|
pass
|
|
372
|
+
class adminCannotUnsuspend(Exception):
|
|
373
|
+
pass
|
|
371
374
|
class alreadyExists(Exception):
|
|
372
375
|
pass
|
|
373
376
|
class applyLabelForbidden(Exception):
|
|
@@ -689,6 +692,7 @@ REASON_EXCEPTION_MAP = {
|
|
|
689
692
|
ABORTED: aborted,
|
|
690
693
|
ABUSIVE_CONTENT_RESTRICTION: abusiveContentRestriction,
|
|
691
694
|
ACCESS_NOT_CONFIGURED: accessNotConfigured,
|
|
695
|
+
ADMIN_CANNOT_UNSUSPEND: adminCannotUnsuspend,
|
|
692
696
|
ALREADY_EXISTS: alreadyExists,
|
|
693
697
|
APPLY_LABEL_FORBIDDEN: applyLabelForbidden,
|
|
694
698
|
AUTH_ERROR: authError,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
gam/__init__.py,sha256=
|
|
1
|
+
gam/__init__.py,sha256=4LIC4zoUw8PEfVYsBf69tu5d1lKHuK89Ft-7sFwPBVw,3571897
|
|
2
2
|
gam/__main__.py,sha256=amz0-959ph6zkZKqjaar4n60yho-T37w6qWI36qx0CA,1049
|
|
3
3
|
gam/cacerts.pem,sha256=82Ak7btW_2XvocLUvAwPmpx8Chi0oqtZUG1gseLK_t4,50235
|
|
4
4
|
gam/cbcm-v1.1beta1.json,sha256=xO5XloCQQULmPbFBx5bckdqmbLFQ7sJ2TImhE1ysDIY,19439
|
|
@@ -27,7 +27,7 @@ gam/gamlib/glapi.py,sha256=2syc4jmTV2cNLdSjvOKA5usatnnLOlOSNxqnj1iXhNs,36056
|
|
|
27
27
|
gam/gamlib/glcfg.py,sha256=bNTckxzIM_HruxO2DfYsDbEgqOIz1RX6CbU6XOQQQyg,28296
|
|
28
28
|
gam/gamlib/glclargs.py,sha256=zCfq3-XRiaEF58o5lmQVnxgV3AqMWMIs4Ra42iHExPQ,43538
|
|
29
29
|
gam/gamlib/glentity.py,sha256=bFVeXqJ4VLIpFgc9y083oeBn8JzbwPYVJeuJF0yrnk8,34405
|
|
30
|
-
gam/gamlib/glgapi.py,sha256=
|
|
30
|
+
gam/gamlib/glgapi.py,sha256=pdBbwNtnCwFWxJGaP-_3hdTjSNoOCJF2yo76WdQOi1k,40426
|
|
31
31
|
gam/gamlib/glgdata.py,sha256=weRppttWm6uRyqtBoGPKoHiNZ2h28nhfUV4J_mbCszY,2707
|
|
32
32
|
gam/gamlib/glglobals.py,sha256=J0xcHggVrUBzHJ5GruenKV-qV1zPKcK2qWgAgN3i5Jw,9608
|
|
33
33
|
gam/gamlib/glindent.py,sha256=RfBa2LDfLIqPLL5vMfC689TCVmqn8xf-qulSzkiatrc,1228
|
|
@@ -65,8 +65,8 @@ gam/googleapiclient/discovery_cache/base.py,sha256=yCDPtxnbNN-p5_9fzBacC6P3wcUPl
|
|
|
65
65
|
gam/googleapiclient/discovery_cache/file_cache.py,sha256=sim3Mg4HgRYo3vX75jvcKy_aV568EvIrtBfvfbw-044,4774
|
|
66
66
|
gam/iso8601/__init__.py,sha256=Z2PsYbXgAH5a5xzUvgczCboPzqWpm65kRcIngCnhViU,1218
|
|
67
67
|
gam/iso8601/iso8601.py,sha256=Li2FHZ4sBTWuthuQhyCvmvj0j6At8JbGzkSv2fc2RHU,4384
|
|
68
|
-
gam7-7.14.
|
|
69
|
-
gam7-7.14.
|
|
70
|
-
gam7-7.14.
|
|
71
|
-
gam7-7.14.
|
|
72
|
-
gam7-7.14.
|
|
68
|
+
gam7-7.14.4.dist-info/METADATA,sha256=9Uz4EsMMfP2FLDMvPn4rcOjNaXVd72vlh00c_uFAOrY,2940
|
|
69
|
+
gam7-7.14.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
70
|
+
gam7-7.14.4.dist-info/entry_points.txt,sha256=HVUM5J7dA8YwvJfG30jiLefR19ExMs387TWugWd9sf4,42
|
|
71
|
+
gam7-7.14.4.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
72
|
+
gam7-7.14.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|