diff --git a/lib/galaxy/webapps/galaxy/controllers/user.py b/lib/galaxy/webapps/galaxy/controllers/user.py index 6e00ba9e0ee..f58385621e8 100644 --- a/lib/galaxy/webapps/galaxy/controllers/user.py +++ b/lib/galaxy/webapps/galaxy/controllers/user.py @@ -616,11 +616,14 @@ class User( BaseUIController, UsesFormDefinitionsMixin, CreatesUsersMixin, Creat if biostar_url: # TODO: It would be better if we automatically logged this user out of biostar message += '
To logout of Biostar, please click here.' % ( biostar_url ) - return trans.fill_template( '/user/logout.mako', - refresh_frames=refresh_frames, - message=message, - status='done', - active_view="user" ) + if trans.app.config.use_remote_user and trans.app.config.remote_user_logout_href: + trans.response.send_redirect(trans.app.config.remote_user_logout_href) + else: + return trans.fill_template('/user/logout.mako', + refresh_frames=refresh_frames, + message=message, + status='done', + active_view="user" ) @web.expose def create( self, trans, cntrller='user', redirect_url='', refresh_frames=[], **kwd ): diff --git a/static/scripts/galaxy.menu.js b/static/scripts/galaxy.menu.js index d557a98bc00..6e0f73df372 100644 --- a/static/scripts/galaxy.menu.js +++ b/static/scripts/galaxy.menu.js @@ -289,34 +289,24 @@ var GalaxyMenu = Backbone.Model.extend( title : "Logged in as " + this.options.user.email }); - // remote user - if (this.options.use_remote_user && this.options.remote_user_logout_href) - { - tab_user.add({ - title : "Logout", - content : this.options.remote_user_logout_href, - target : "_top" - }); - } else { - tab_user.add({ - title : "Preferences", - content : "user?cntrller=user", - target : "galaxy_main" - }); + tab_user.add({ + title : "Preferences", + content : "user?cntrller=user", + target : "galaxy_main" + }); - tab_user.add({ - title : "Custom Builds", - content : "user/dbkeys", - target : "galaxy_main" - }); - - tab_user.add({ - title : "Logout", - content : "user/logout", - target : "_top", - divider : true - }); - } + tab_user.add({ + title : "Custom Builds", + content : "user/dbkeys", + target : "galaxy_main" + }); + + tab_user.add({ + title : "Logout", + content : "user/logout", + target : "_top", + divider : true + }); // default tabs tab_user.add({ diff --git a/templates/user/index.mako b/templates/user/index.mako index 6d9648e91f5..ed56148b599 100644 --- a/templates/user/index.mako +++ b/templates/user/index.mako @@ -19,13 +19,7 @@ %if trans.app.config.enable_openid and not trans.app.config.use_remote_user:
  • ${_('Manage OpenIDs')} linked to your account
  • %endif - %if trans.app.config.use_remote_user: - %if trans.app.config.remote_user_logout_href: -
  • ${_('Logout')}
  • - %endif - %else: -
  • ${_('Logout')} ${_('of all user sessions')}
  • - %endif +
  • ${_('Logout')} ${_('of all user sessions')}
  • %else:
  • ${_('Manage your information')}
  • ${_('Manage your API keys')}