Skip to content

Commit

Permalink
Merge pull request #1068 from okfn/1068-404-on-user-not-found
Browse files Browse the repository at this point in the history
Non-existent user profile should give error
  • Loading branch information
nigelbabu committed Nov 13, 2013
2 parents aa18dd8 + 7f1327f commit a73ee7a
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 a73ee7a

Please sign in to comment.