Merge pull request #1003 from dannon/remote_user_apache_fix

[15.10] Fix Remote User failures due to apache null headers.
This commit is contained in:
Nate Coraor
2015-11-03 09:03:51 -05:00
+3 -2
View File
@@ -397,9 +397,10 @@ class GalaxyWebTransaction( base.DefaultWebTransaction,
# No user, associate
galaxy_session.user = self.get_or_create_remote_user( remote_user_email )
galaxy_session_requires_flush = True
elif ((galaxy_session.user.email != remote_user_email) and
elif (not remote_user_email.startswith('(null)') and # Apache does this, see remoteuser.py
(galaxy_session.user.email != remote_user_email) and
((not self.app.config.allow_user_impersonation) or
(remote_user_email not in self.app.config.admin_users_list))):
(remote_user_email not in self.app.config.admin_users_list))):
# Session exists but is not associated with the correct
# remote user, and the currently set remote_user is not a
# potentially impersonating admin.