Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Simone Rossi
main
Commits
a1786bd6
Commit
a1786bd6
authored
Oct 31, 2018
by
Daniele Venzano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Give helpful message when email is not set to public in GitLab
parent
dea70812
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
zoe_api/rest_api/user.py
zoe_api/rest_api/user.py
+6
-1
No files found.
zoe_api/rest_api/user.py
View file @
a1786bd6
...
...
@@ -169,7 +169,12 @@ class UserOAuthCallbackAPI(ZoeAPIRequestHandler):
self
.
redirect
(
self
.
reverse_url
(
"login"
))
return
data
=
resp
.
json
()
email
=
data
[
'email'
]
try
:
email
=
data
[
'email'
]
except
KeyError
:
with_gitlab_oauth
=
zoe_lib
.
config
.
get_conf
().
oauth_client_id
!=
''
self
.
render
(
'login.jinja2'
,
error
=
'Email address not set to public in GitLab settings'
,
with_gitlab_oauth
=
with_gitlab_oauth
)
return
username
=
data
[
'nickname'
]
user
=
self
.
api_endpoint
.
user_by_name
(
username
)
if
user
is
not
None
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment