Slight simplification of logic related to implementation of tool.requires_login.

This commit is contained in:
John Chilton
2013-08-06 00:01:44 -05:00
parent ce127d5e84
commit cd54689f20
+1 -3
View File
@@ -12,7 +12,7 @@ class FilterFactory( object ):
# 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 @@ class FilterFactory( object ):
"""
filters = self.default_filters.copy()
filters[ "tool" ].append( _handle_requires_login )
if kwds.get( "trackster", False ):
filters[ "tool" ].append( _has_trackster_conf )