Skip to content

Commit

Permalink
Add error message if openids are disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Dec 12, 2017
1 parent 364804f commit 200d8a2
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions lib/galaxy/webapps/galaxy/controllers/user.py
Expand Up @@ -428,10 +428,14 @@ def openid_disassociate(self, trans, **kwd):
@web.expose_api
@web.require_login('manage OpenIDs')
def openids_list(self, trans, **kwd):
'''Manage OpenIDs for user'''
#if not trans.app.config.enable_openid:
# return trans.show_error_message('OpenID authentication is not enabled in this instance of Galaxy')
#use_panels = kwd.get('use_panels', False)
'''List of availabel OpenIDs for user'''
message = kwd.get('message', '')
status = kwd.get('status', '')
if not trans.app.config.enable_openid:
message, status = ('OpenID authentication is not enabled in this instance of Galaxy.', 'error')
if 'operation' in kwd:
operation = kwd['operation'].lower()
id = kwd.get('id')
#if 'operation' in kwd:
# operation = kwd['operation'].lower()
# if operation == "delete":
Expand All @@ -441,6 +445,9 @@ def openids_list(self, trans, **kwd):
# id=kwd['id']))
#kwd['redirect'] = kwd.get('redirect', url_for(controller='user', action='openid_manage', use_panels=True)).strip()
#kwd['openid_providers'] = trans.app.openid_providers
if message and status:
kwd['message'] = util.sanitize_text(message)
kwd['status'] = status
kwd['dict_format'] = True
return self.user_openid_grid(trans, **kwd)

Expand Down

0 comments on commit 200d8a2

Please sign in to comment.