Created
August 20, 2014 16:51
-
-
Save dannon/17d0e14d7917a2aca70a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r 30c4d8730943 lib/galaxy/webapps/galaxy/controllers/user.py | |
--- a/lib/galaxy/webapps/galaxy/controllers/user.py Wed Aug 20 12:33:11 2014 -0400 | |
+++ b/lib/galaxy/webapps/galaxy/controllers/user.py Wed Aug 20 12:50:51 2014 -0400 | |
@@ -616,11 +616,14 @@ class User( BaseUIController, UsesFormDe | |
if biostar_url: | |
# TODO: It would be better if we automatically logged this user out of biostar | |
message += '<br>To logout of Biostar, please click <a href="%s" target="_blank">here</a>.' % ( 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 -r 30c4d8730943 static/scripts/galaxy.menu.js | |
--- a/static/scripts/galaxy.menu.js Wed Aug 20 12:33:11 2014 -0400 | |
+++ b/static/scripts/galaxy.menu.js Wed Aug 20 12:50:51 2014 -0400 | |
@@ -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 -r 30c4d8730943 templates/user/index.mako | |
--- a/templates/user/index.mako Wed Aug 20 12:33:11 2014 -0400 | |
+++ b/templates/user/index.mako Wed Aug 20 12:50:51 2014 -0400 | |
@@ -19,13 +19,7 @@ | |
%if trans.app.config.enable_openid and not trans.app.config.use_remote_user: | |
<li><a href="${h.url_for( controller='user', action='openid_manage', cntrller=cntrller )}">${_('Manage OpenIDs')}</a> linked to your account</li> | |
%endif | |
- %if trans.app.config.use_remote_user: | |
- %if trans.app.config.remote_user_logout_href: | |
- <li><a href="${trans.app.config.remote_user_logout_href}" target="_top">${_('Logout')}</a></li> | |
- %endif | |
- %else: | |
- <li><a href="${h.url_for( controller='user', action='logout', logout_all=True )}" target="_top">${_('Logout')}</a> ${_('of all user sessions')}</li> | |
- %endif | |
+ <li><a href="${h.url_for( controller='user', action='logout', logout_all=True )}" target="_top">${_('Logout')}</a> ${_('of all user sessions')}</li> | |
%else: | |
<li><a href="${h.url_for( controller='user', action='manage_user_info', cntrller=cntrller )}">${_('Manage your information')}</a></li> | |
<li><a href="${h.url_for( controller='user', action='api_keys', cntrller=cntrller )}">${_('Manage your API keys')}</a></li> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment