Skip to content

Commit

Permalink
[#1068] Show 404 instead of login page on user not found
Browse files Browse the repository at this point in the history
Remove unnecessary auth check, fix redirect
  • Loading branch information
amercader committed Nov 7, 2013
1 parent de166d9 commit 7f1327f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions ckan/controllers/user.py
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 7f1327f

Please sign in to comment.