gam7 7.21.1__py3-none-any.whl → 7.21.3__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 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.21.01'
28
+ __version__ = '7.21.03'
29
29
  __license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
30
30
 
31
31
  #pylint: disable=wrong-import-position
@@ -9361,6 +9361,7 @@ MACOS_CODENAMES = {
9361
9361
  13: 'Ventura',
9362
9362
  14: 'Sonoma',
9363
9363
  15: 'Sequoia',
9364
+ 26: 'Tahoe',
9364
9365
  }
9365
9366
 
9366
9367
  def getOSPlatform():
@@ -9370,7 +9371,7 @@ def getOSPlatform():
9370
9371
  elif myos == 'Windows':
9371
9372
  pltfrm = ' '.join(platform.win32_ver())
9372
9373
  elif myos == 'Darwin':
9373
- myos = 'MacOS'
9374
+ myos = 'macOS'
9374
9375
  mac_ver = platform.mac_ver()[0]
9375
9376
  major_ver = int(mac_ver.split('.')[0]) # macver 10.14.6 == major_ver 10
9376
9377
  minor_ver = int(mac_ver.split('.')[1]) # macver 10.14.6 == minor_ver 14
@@ -43946,6 +43947,7 @@ def getUserAttributes(cd, updateCmd, noUid=False):
43946
43947
  invalidArgumentExit(Cmd.OB_SCHEMA_NAME_FIELD_NAME)
43947
43948
 
43948
43949
  parameters = {
43950
+ 'notifyRecoveryEmail': False,
43949
43951
  'verifyNotInvitable': False,
43950
43952
  'createIfNotFound': False,
43951
43953
  'noActionIfAlias': False,
@@ -43962,7 +43964,7 @@ def getUserAttributes(cd, updateCmd, noUid=False):
43962
43964
  body = {'name': {'givenName': UNKNOWN, 'familyName': UNKNOWN}}
43963
43965
  body['primaryEmail'] = getEmailAddress(noUid=noUid)
43964
43966
  notFoundBody = {}
43965
- notify = {'subject': '', 'message': '', 'html': False, 'charset': UTF8, 'password': ''}
43967
+ notify = {'recipients': [], 'subject': '', 'message': '', 'html': False, 'charset': UTF8, 'password': ''}
43966
43968
  primary = {}
43967
43969
  updatePrimaryEmail = {}
43968
43970
  groupOrgUnitMap = None
@@ -43974,7 +43976,9 @@ def getUserAttributes(cd, updateCmd, noUid=False):
43974
43976
  while Cmd.ArgumentsRemaining():
43975
43977
  myarg = getArgument()
43976
43978
  if myarg == 'notify':
43977
- notify['recipients'] = getNormalizedEmailAddressEntity(shlexSplit=True, noLower=True)
43979
+ notify['recipients'].extend(getNormalizedEmailAddressEntity(shlexSplit=True, noLower=True))
43980
+ elif myarg == 'notifyrecoveryemail':
43981
+ parameters['notifyRecoveryEmail'] = True
43978
43982
  elif myarg == 'subject':
43979
43983
  notify['subject'] = getString(Cmd.OB_STRING)
43980
43984
  elif myarg in SORF_MSG_FILE_ARGUMENTS:
@@ -44390,7 +44394,7 @@ def createUserAddAliases(cd, user, aliasList, i, count):
44390
44394
  # (groups [<GroupRole>] [[delivery] <DeliverySetting>] <GroupEntity>)*
44391
44395
  # [alias|aliases <EmailAddressList>]
44392
44396
  # [license <SKUID> [product|productid <ProductID>]]
44393
- # [notify <EmailAddressList>
44397
+ # [[notify <EmailAddressList>] [notifyrecoveryemail]
44394
44398
  # [subject <String>]
44395
44399
  # [notifypassword <String>]
44396
44400
  # [from <EmailAaddress>]
@@ -44408,7 +44412,7 @@ def doCreateUser():
44408
44412
  suffix = 0
44409
44413
  originalEmail = body['primaryEmail']
44410
44414
  atLoc = originalEmail.find('@')
44411
- fields = '*' if tagReplacements['subs'] else 'primaryEmail,name'
44415
+ fields = '*' if tagReplacements['subs'] else 'primaryEmail,name,recoveryEmail'
44412
44416
  while True:
44413
44417
  user = body['primaryEmail']
44414
44418
  if parameters['verifyNotInvitable']:
@@ -44449,7 +44453,9 @@ def doCreateUser():
44449
44453
  createUserAddToGroups(cd, result['primaryEmail'], addGroups, 0, 0)
44450
44454
  if addAliases:
44451
44455
  createUserAddAliases(cd, result['primaryEmail'], addAliases, 0, 0)
44452
- if notify.get('recipients'):
44456
+ if (notify.get('recipients') or (parameters['notifyRecoveryEmail'] and result.get('recoveryEmail'))):
44457
+ if parameters['notifyRecoveryEmail'] and result.get('recoveryEmail'):
44458
+ notify['recipients'].append(result['recoveryEmail'])
44453
44459
  sendCreateUpdateUserNotification(result, notify, tagReplacements)
44454
44460
  for productSku in parameters[LICENSE_PRODUCT_SKUIDS]:
44455
44461
  productId = productSku[0]
@@ -44492,7 +44498,7 @@ def verifyUserPrimaryEmail(cd, user, createIfNotFound, i, count):
44492
44498
  # [createifnotfound] [notfoundpassword (random [<Integer>])|blocklogin|<Password>]
44493
44499
  # (groups [<GroupRole>] [[delivery] <DeliverySetting>] <GroupEntity>)*
44494
44500
  # [alias|aliases <EmailAddressList>]
44495
- # [notify <EmailAddressList>
44501
+ # [[notify <EmailAddressList>] [notifyrecoveryemail]
44496
44502
  # [subject <String>]
44497
44503
  # [notifypassword <String>]
44498
44504
  # [from <EmailAaddress>]
@@ -44521,7 +44527,7 @@ def updateUsers(entityList):
44521
44527
  else:
44522
44528
  checkImmutableOUs = False
44523
44529
  i, count, entityList = getEntityArgument(entityList)
44524
- fields = '*' if tagReplacements['subs'] else 'primaryEmail,name'
44530
+ fields = '*' if tagReplacements['subs'] else 'primaryEmail,name,recoveryEmail'
44525
44531
  for user in entityList:
44526
44532
  i += 1
44527
44533
  user = userKey = normalizeEmailAddressOrUID(user)
@@ -44597,7 +44603,10 @@ def updateUsers(entityList):
44597
44603
  entityActionPerformed([Ent.USER, user], i, count)
44598
44604
  if PwdOpts.filename and PwdOpts.password:
44599
44605
  writeFile(PwdOpts.filename, f'{userKey},{PwdOpts.password}\n', mode='a', continueOnError=True)
44600
- if parameters['notifyOnUpdate'] and notify.get('recipients') and notify['password']:
44606
+ if (parameters['notifyOnUpdate'] and notify['password'] and
44607
+ (notify.get('recipients') or (parameters['notifyRecoveryEmail'] and result.get('recoveryEmail')))):
44608
+ if parameters['notifyRecoveryEmail'] and result.get('recoveryEmail'):
44609
+ notify['recipients'].append(result['recoveryEmail'])
44601
44610
  sendCreateUpdateUserNotification(result, notify, tagReplacements, i, count, createMessage=False)
44602
44611
  break
44603
44612
  except GAPI.conditionNotMet as e:
@@ -44631,8 +44640,10 @@ def updateUsers(entityList):
44631
44640
  createUserAddToGroups(cd, result['primaryEmail'], addGroups, i, count)
44632
44641
  if addAliases:
44633
44642
  createUserAddAliases(cd, result['primaryEmail'], addAliases, i, count)
44634
- if notify.get('recipients'):
44643
+ if (notify.get('recipients') or (parameters['notifyRecoveryEmail'] and result.get('recoveryEmail'))):
44635
44644
  notify['password'] = notify['notFoundPassword']
44645
+ if parameters['notifyRecoveryEmail'] and result.get('recoveryEmail'):
44646
+ notify['recipients'].append(result['recoveryEmail'])
44636
44647
  sendCreateUpdateUserNotification(result, notify, tagReplacements, i, count)
44637
44648
  except GAPI.duplicate:
44638
44649
  duplicateAliasGroupUserWarning(cd, [Ent.USER, body['primaryEmail']], i, count)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gam7
3
- Version: 7.21.1
3
+ Version: 7.21.3
4
4
  Summary: CLI tool to manage Google Workspace
5
5
  Project-URL: Homepage, https://github.com/GAM-team/GAM
6
6
  Project-URL: Issues, https://github.com/GAM-team/GAM/issues
@@ -1,4 +1,4 @@
1
- gam/__init__.py,sha256=z_pA2bVbJhwPYRzT8iZNqKY1vUBAzzZw1tiTi2u7f-s,3609290
1
+ gam/__init__.py,sha256=_1lJp1NkVPUiklWyNKv4HoYleKE0fgRaCH8kB25R6DY,3610215
2
2
  gam/__main__.py,sha256=amz0-959ph6zkZKqjaar4n60yho-T37w6qWI36qx0CA,1049
3
3
  gam/cacerts.pem,sha256=DUsVo2XlFYwfkhe3gnxa-Km4Z4noz74hSApXwTT-nQE,44344
4
4
  gam/cbcm-v1.1beta1.json,sha256=xO5XloCQQULmPbFBx5bckdqmbLFQ7sJ2TImhE1ysDIY,19439
@@ -47,8 +47,8 @@ gam/gdata/apps/audit/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrK
47
47
  gam/gdata/apps/audit/service.py,sha256=Z1eueThcNeVUMWP1DRWc_DGHrJCiJI8W_xj6L-cqu-Q,9658
48
48
  gam/gdata/apps/contacts/__init__.py,sha256=Um6zgIkiahZns7yAEuC3pxHSMD8iciZ_EoynSLoYPfU,30463
49
49
  gam/gdata/apps/contacts/service.py,sha256=5lNb-Ii1Gyek6ePFji3kyoYtCBc8CuJTwagx2BL2o14,15684
50
- gam7-7.21.1.dist-info/METADATA,sha256=dD5iz3rkw_Kg2nXmuVJAOrfy5UjGJXvX5TTI5YIQwjU,2937
51
- gam7-7.21.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
52
- gam7-7.21.1.dist-info/entry_points.txt,sha256=HVUM5J7dA8YwvJfG30jiLefR19ExMs387TWugWd9sf4,42
53
- gam7-7.21.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
54
- gam7-7.21.1.dist-info/RECORD,,
50
+ gam7-7.21.3.dist-info/METADATA,sha256=BZtfkO9lwv8COlmsdv0htZGWOrFGv3cmAhgwn2duGUg,2937
51
+ gam7-7.21.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
52
+ gam7-7.21.3.dist-info/entry_points.txt,sha256=HVUM5J7dA8YwvJfG30jiLefR19ExMs387TWugWd9sf4,42
53
+ gam7-7.21.3.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
54
+ gam7-7.21.3.dist-info/RECORD,,
File without changes