Skip to content

Commit

Permalink
[#3012] Allow unauthorized users to view edit their profile
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Nov 9, 2012
1 parent 118bdc5 commit 3e5ecab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions ckan/lib/base.py
Expand Up @@ -272,6 +272,7 @@ def _identify_user(self):
c.unauthorized_user = False
if c.userobj and g.authorized_users_only:
if not (c.userobj.authorized or c.userobj.sysadmin):
c.unauthorized_userobj = c.userobj
c.userobj = None
c.unauthorized_user = True

Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/user/edit.html
@@ -1,6 +1,6 @@
{% extends 'page.html' %}

{% set user = c.userobj %}
{% set user = c.userobj or c.unauthorized_userobj %}

{% block breadcrumb_content %}
<li>{% link_for _('User'), controller='user', action='index' %}</li>
Expand Down

0 comments on commit 3e5ecab

Please sign in to comment.