From 7f1327fe010debaee0eed9a5d3c87c119aede52c Mon Sep 17 00:00:00 2001 From: amercader Date: Thu, 7 Nov 2013 13:45:55 +0000 Subject: [PATCH] [#1068] Show 404 instead of login page on user not found Remove unnecessary auth check, fix redirect --- ckan/controllers/user.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ckan/controllers/user.py b/ckan/controllers/user.py index 1c6fefff344..28f62b85e01 100644 --- a/ckan/controllers/user.py +++ b/ckan/controllers/user.py @@ -68,7 +68,7 @@ def _setup_template_variables(self, context, data_dict): try: user_dict = get_action('user_show')(context, data_dict) except NotFound: - h.redirect_to(controller='user', action='login', id=None) + abort(404, _('User not found')) except NotAuthorized: abort(401, _('Not authorized to see this page')) c.user_dict = user_dict @@ -117,10 +117,6 @@ def read(self, id=None): 'for_view': True} data_dict = {'id': id, 'user_obj': c.userobj} - try: - check_access('user_show', context, data_dict) - except NotAuthorized: - abort(401, _('Not authorized to see this page')) context['with_related'] = True