details:
http://www.bx.psu.edu/hg/galaxy/rev/035c0dc31963
changeset: 2468:035c0dc31963
user: Greg Von Kuster <greg(a)bx.psu.edu>
date: Wed Jul 08 15:25:57 2009 -0400
description:
Add remote_user logout anchor href configuration provided by Morita Hideyuki.
3 file(s) affected in this change:
lib/galaxy/config.py
templates/base_panels.mako
universe_wsgi.ini.sample
diffs (60 lines):
diff -r 319e2ba6a7be -r 035c0dc31963 lib/galaxy/config.py
--- a/lib/galaxy/config.py Wed Jul 08 14:10:45 2009 -0400
+++ b/lib/galaxy/config.py Wed Jul 08 15:25:57 2009 -0400
@@ -42,6 +42,7 @@
self.set_metadata_externally = string_as_bool( kwargs.get(
"set_metadata_externally", "False" ) )
self.use_remote_user = string_as_bool( kwargs.get( "use_remote_user",
"False" ) )
self.remote_user_maildomain = kwargs.get( "remote_user_maildomain",
None )
+ self.remote_user_logout_href = kwargs.get( "remote_user_logout_href",
None )
self.require_login = string_as_bool( kwargs.get( "require_login",
"False" ) )
self.allow_user_creation = string_as_bool( kwargs.get(
"allow_user_creation", "True" ) )
self.allow_user_deletion = string_as_bool( kwargs.get(
"allow_user_deletion", "False" ) )
diff -r 319e2ba6a7be -r 035c0dc31963 templates/base_panels.mako
--- a/templates/base_panels.mako Wed Jul 08 14:10:45 2009 -0400
+++ b/templates/base_panels.mako Wed Jul 08 15:25:57 2009 -0400
@@ -199,16 +199,22 @@
</ul>
<ul class="loggedin-only" style="${style2}">
<li>Logged in as <span
id="user-email">${user_email}</span></li>
- <li><a target="galaxy_main" href="${h.url_for(
controller='user', action='index'
)}">Preferences</a></li>
- <%
- if app.config.require_login:
- logout_target = ""
- logout_url = h.url_for( controller='root',
action='index', m_c='user', m_a='logout' )
- else:
- logout_target = "galaxy_main"
- logout_url = h.url_for( controller='user',
action='logout' )
- %>
- <li><a target="${logout_target}"
href="${logout_url}">Logout</a></li>
+ %if app.config.use_remote_user:
+ %if app.config.remote_user_logout_href:
+ <li><a
href="${app.config.remote_user_logout_href}"
target="_top">Logout</a></li>
+ %endif
+ %else:
+ <li><a target="galaxy_main" href="${h.url_for(
controller='user', action='index'
)}">Preferences</a></li>
+ <%
+ if app.config.require_login:
+ logout_target = ""
+ logout_url = h.url_for( controller='root',
action='index', m_c='user', m_a='logout' )
+ else:
+ logout_target = "galaxy_main"
+ logout_url = h.url_for( controller='user',
action='logout' )
+ %>
+ <li><a target="${logout_target}"
href="${logout_url}">Logout</a></li>
+ %endif
</ul>
</div>
</span>
diff -r 319e2ba6a7be -r 035c0dc31963 universe_wsgi.ini.sample
--- a/universe_wsgi.ini.sample Wed Jul 08 14:10:45 2009 -0400
+++ b/universe_wsgi.ini.sample Wed Jul 08 15:25:57 2009 -0400
@@ -141,6 +141,9 @@
# method just returns bare usernames, set a default mail domain
#remote_user_maildomain =
example.org
+# If use_remote_user is enabled, set a logout anchor href option
+#remote_user_logout_href = /logout
+
# this should be a comma-separated list of valid Galaxy users
#admin_users = user1@example.org,user2@example.org