From 5ec417d50c16d419f35e258d20815f568ec4f4f8 Mon Sep 17 00:00:00 2001 From: Ross Scroggs Date: Tue, 8 Nov 2016 13:32:38 -0800 Subject: [PATCH] Validate full email address on gam oauth create (#321) * Validate full email address on gam oauth create * Update documentation --- src/GamCommands.txt | 4 ++-- src/gam.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/GamCommands.txt b/src/GamCommands.txt index 346b2694..c3426ea7 100644 --- a/src/GamCommands.txt +++ b/src/GamCommands.txt @@ -477,7 +477,8 @@ gam csv |- [charset ] gam # Example: gam csv Users.csv gam update user '~primaryEmail' address type work unstructured '~~Street~~, ~~City~~, ~~State~~ ~~ZIP~~' # Each user (~primaryEmail, e.g. foo@bar.com) would have their work address updated -gam oauth|oauth2 create|request +gam oauth|oauth2 create|request [] + gam oauth|oauth2 delete|revoke gam oauth|oauth2 info|verify [] @@ -506,7 +507,6 @@ gam delete domainalias|aliasdomain gam info domainalias|aliasdomain gam print domainaliases|aliasdomains [todrive] - gam info customer gam update customer [adminsecondaryemail|alternateemail ] [language ] [contact|contactname ] [name|organizationname ] diff --git a/src/gam.py b/src/gam.py index 216a28c8..5451f62d 100755 --- a/src/gam.py +++ b/src/gam.py @@ -10094,7 +10094,7 @@ See this site for instructions: print u'ERROR: the format of your client secrets file:\n\n%s\n\n is incorrect. Please recreate the file.' sys.exit(3) - if not login_hint: + if not login_hint or login_hint.find(u'@') == -1: while True: login_hint = raw_input(u'\nWhat is your G Suite admin email address? ') if login_hint.find(u'@') == -1: