1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/f197c4346cc4/ changeset: f197c4346cc4 user: dan date: 2012-06-22 19:31:29 summary: Allow external display applications to work when login_required=True. affected #: 1 file diff -r db2bf800496478a5ea041480c3c514c2620e28ae -r f197c4346cc44bf3996eee6b24e2c393ad519d9d lib/galaxy/web/framework/__init__.py --- a/lib/galaxy/web/framework/__init__.py +++ b/lib/galaxy/web/framework/__init__.py @@ -419,7 +419,7 @@ # The value of session_cookie can be one of # 'galaxysession' or 'galaxycommunitysession' # Currently this method does nothing unless session_cookie is 'galaxysession' - if session_cookie == 'galaxysession': + if session_cookie == 'galaxysession' and self.galaxy_session.user is None: # TODO: re-engineer to eliminate the use of allowed_paths # as maintenance overhead is far too high. allowed_paths = ( @@ -443,16 +443,23 @@ url_for( controller='dataset', action='list' ) ) display_as = url_for( controller='root', action='display_as' ) - if self.galaxy_session.user is None: - if self.app.config.ucsc_display_sites and self.request.path == display_as: - try: - host = socket.gethostbyaddr( self.environ[ 'REMOTE_ADDR' ] )[0] - except( socket.error, socket.herror, socket.gaierror, socket.timeout ): - host = None - if host in UCSC_SERVERS: + if self.app.config.ucsc_display_sites and self.request.path == display_as: + try: + host = socket.gethostbyaddr( self.environ[ 'REMOTE_ADDR' ] )[0] + except( socket.error, socket.herror, socket.gaierror, socket.timeout ): + host = None + if host in UCSC_SERVERS: + return + external_display_path = url_for( controller='dataset', action='display_application' ) + if self.request.path.startswith( external_display_path ): + request_path_split = external_display_path.split( '/' ) + try: + if self.app.datatypes_registry.display_applications.get( request_path_split[-5] ) and request_path_split[-4] in self.app.datatypes_registry.display_applications.get( request_path_split[-5] ).links and request_path_split[-3] != 'None': return - if self.request.path not in allowed_paths: - self.response.send_redirect( url_for( controller='root', action='index' ) ) + except IndexError: + pass + if self.request.path not in allowed_paths: + self.response.send_redirect( url_for( controller='root', action='index' ) ) def __create_new_session( self, prev_galaxy_session=None, user_for_new_session=None ): """ Create a new GalaxySession for this request, possibly with a connection Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.