From 51793f443d36261a560d6171e764430cb20344cd Mon Sep 17 00:00:00 2001 From: Ross Scroggs Date: Mon, 3 Mar 2025 08:55:42 -0800 Subject: [PATCH] mprove message displayed when a command is issued that requires Google Chat Bot setup --- src/GamUpdate.txt | 5 +++++ src/gam/__init__.py | 8 +++++--- src/gam/gamlib/glmsgs.py | 4 +++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/GamUpdate.txt b/src/GamUpdate.txt index b25b123a..ee1ef246 100644 --- a/src/GamUpdate.txt +++ b/src/GamUpdate.txt @@ -1,3 +1,8 @@ +7.05.06 + +Improve message displayed when a command is issued that requires Google Chat Bot setup; +display a link to the Wiki `Set up a Chat Bot` instructions. + 7.05.05 Added options `password prompt` and `password uniqueprompt` to `gam create user ` diff --git a/src/gam/__init__.py b/src/gam/__init__.py index e2c2cbc9..e1acb0ce 100755 --- a/src/gam/__init__.py +++ b/src/gam/__init__.py @@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki """ __author__ = 'GAM Team ' -__version__ = '7.05.05' +__version__ = '7.05.06' __license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)' #pylint: disable=wrong-import-position @@ -43582,14 +43582,16 @@ def undeleteUsers(entityList): callGAPI(cd.users(), 'undelete', throwReasons=[GAPI.DELETED_USER_NOT_FOUND, GAPI.INVALID_ORGUNIT, GAPI.DOMAIN_NOT_FOUND, GAPI.DOMAIN_CANNOT_USE_APIS, - GAPI.FORBIDDEN, GAPI.BAD_REQUEST, GAPI.INVALID, GAPI.DUPLICATE], + GAPI.FORBIDDEN, GAPI.BAD_REQUEST, GAPI.INVALID, GAPI.DUPLICATE, + GAPI.LIMIT_EXCEEDED], userKey=user_uid, body={'orgUnitPath': makeOrgUnitPathAbsolute(orgUnitPaths[0])}) entityActionPerformed([Ent.DELETED_USER, user], i, count) except GAPI.deletedUserNotFound: entityUnknownWarning(Ent.DELETED_USER, user, i, count) except GAPI.invalidOrgunit: entityActionFailedWarning([Ent.USER, user], Msg.INVALID_ORGUNIT, i, count) - except (GAPI.domainNotFound, GAPI.domainCannotUseApis, GAPI.forbidden, GAPI.badRequest, GAPI.invalid, GAPI.duplicate) as e: + except (GAPI.domainNotFound, GAPI.domainCannotUseApis, GAPI.forbidden, GAPI.badRequest, + GAPI.invalid, GAPI.duplicate, GAPI.limitExceeded) as e: entityActionFailedWarning([Ent.USER, user], str(e), i, count) # gam undelete users [ou|org|orgunit ] diff --git a/src/gam/gamlib/glmsgs.py b/src/gam/gamlib/glmsgs.py index 39ac45e8..7d98994d 100644 --- a/src/gam/gamlib/glmsgs.py +++ b/src/gam/gamlib/glmsgs.py @@ -504,7 +504,9 @@ To set up Google Chat for your API project, please go to: {0} -and complete all fields. +and follow the instructions at: + + https://github.com/GAM-team/GAM/wiki/Chat-Bot#set-up-a-chat-bot """ TOTAL_ITEMS_IN_ENTITY = 'Total {0} in {1}' TRIMMED_MESSAGE_FROM_LENGTH_TO_MAXIMUM = 'Trimmed message of length {0} to maximum length {1}'