commit/galaxy-central: 2 new changesets
2 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/1dd1b4a87b3e/ Changeset: 1dd1b4a87b3e User: jmchilton Date: 2013-08-06 06:50:04 Summary: Fix tool.requires_login behvaior broken with dynamic tool box filters (sorry again Dan and thanks for the bug report). Affected #: 1 file diff -r 4a514b0de915b8d8ea3b9ff333d04b0907a5fb66 -r 1dd1b4a87b3eeb4c57bbf2a1362077bb4ee21dc1 lib/galaxy/tools/filters/__init__.py --- a/lib/galaxy/tools/filters/__init__.py +++ b/lib/galaxy/tools/filters/__init__.py @@ -25,8 +25,7 @@ """ filters = self.default_filters.copy() - if not trans.user: - filters[ "tool" ].append( _requires_login ) + filters[ "tool" ].append( _handle_requires_login ) if kwds.get( "trackster", False ): filters[ "tool" ].append( _has_trackster_conf ) @@ -59,8 +58,8 @@ return not tool.hidden -def _requires_login( context, tool ): - return not tool.require_login +def _handle_requires_login( context, tool ): + return not tool.require_login or context.trans.user def _has_trackster_conf( context, tool ): https://bitbucket.org/galaxy/galaxy-central/commits/cf53a00bcf1d/ Changeset: cf53a00bcf1d User: jmchilton Date: 2013-08-06 07:01:44 Summary: Slight simplification of logic related to implementation of tool.requires_login. Affected #: 1 file diff -r 1dd1b4a87b3eeb4c57bbf2a1362077bb4ee21dc1 -r cf53a00bcf1d279072ec279e6531f211992b4f3e lib/galaxy/tools/filters/__init__.py --- a/lib/galaxy/tools/filters/__init__.py +++ b/lib/galaxy/tools/filters/__init__.py @@ -12,7 +12,7 @@ # Prepopulate dict containing filters that are always checked, # other filters that get checked depending on context (e.g. coming from # trackster or no user found are added in build filters). - self.default_filters = dict( tool=[ _not_hidden ], section=[], label=[] ) + self.default_filters = dict( tool=[ _not_hidden, _handle_requires_login ], section=[], label=[] ) # Add dynamic filters to these default filters. config = toolbox.app.config self.__init_filters( "tool", config.tool_filters ) @@ -25,8 +25,6 @@ """ filters = self.default_filters.copy() - filters[ "tool" ].append( _handle_requires_login ) - if kwds.get( "trackster", False ): filters[ "tool" ].append( _has_trackster_conf ) 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.
participants (1)
-
commits-noreply@bitbucket.org