Skip to content

Commit

Permalink
[#4801] Add routes.named_routes config option
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Dec 6, 2019
1 parent 99fcae4 commit 126f862
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions ckan/config/middleware/flask_app.py
Expand Up @@ -197,6 +197,9 @@ def ungettext_alias():
lib_plugins.register_group_blueprints(app)

# Set flask routes in named_routes
# TODO: refactor whatever helper is using this to not do it
if 'routes.named_routes' not in config:
config['routes.named_routes'] = {}
for rule in app.url_map.iter_rules():
if '.' not in rule.endpoint:
continue
Expand Down
2 changes: 1 addition & 1 deletion ckan/views/__init__.py
Expand Up @@ -157,7 +157,7 @@ def _identify_user_default():
# .plugins.sql )
g.user = request.environ.get(u'REMOTE_USER', u'')
if g.user:
g.user = g.user.decode(u'utf8')
#g.user = g.user.decode(u'utf8')
g.userobj = model.User.by_name(g.user)

if g.userobj is None or not g.userobj.is_active():
Expand Down

0 comments on commit 126f862

Please sign in to comment.