Skip to content

Commit

Permalink
[#2257] Remove the restrict_template_vars config option
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Sep 18, 2012
1 parent 80be35c commit c3e3a6b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions ckan/config/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class _Helpers(object):
missing functions from causing template exceptions. Useful if
templates have helper functions provided by extensions that have
not been enabled. '''
def __init__(self, helpers, restrict=True):
def __init__(self, helpers):
functions = {}
allowed = helpers.__allowed_functions__[:]
# list of functions due to be deprecated
Expand All @@ -41,8 +41,7 @@ def __init__(self, helpers, restrict=True):
for helper in dir(helpers):
if helper not in allowed:
self.deprecated.append(helper)
if restrict:
continue
continue
functions[helper] = getattr(helpers, helper)
if helper in allowed:
allowed.remove(helper)
Expand Down Expand Up @@ -181,9 +180,7 @@ def find_controller(self, controller):
config['pylons.app_globals']._init()

# add helper functions
restrict_helpers = asbool(
config.get('ckan.restrict_template_vars', 'true'))
helpers = _Helpers(h, restrict_helpers)
helpers = _Helpers(h)
config['pylons.h'] = helpers

## redo template setup to use genshi.search_path
Expand Down

0 comments on commit c3e3a6b

Please sign in to comment.