Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal server error when viewing /dashboard when logged out #4305

Closed
rossjones opened this issue Jun 26, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@rossjones
Copy link
Collaborator

commented Jun 26, 2018

CKAN Version if known (or site URL)

2.8.0

Please describe the expected behaviour

When attempting to visit /dashboard as a non-logged in user, the user should be sent to the login page.

Please describe the actual behaviour

An internal server error occurs.

  File "/usr/lib/ckan/default/src/ckan/ckan/views/dashboard.py", line 99, in index
    u'id': g.userobj.id,
AttributeError: 'NoneType' object has no attribute 'id'

What steps can be taken to reproduce the issue?

Visit http://demo.ckan.org/dashboard when not logged in

@rossjones rossjones self-assigned this Jun 26, 2018

rossjones added a commit that referenced this issue Jun 27, 2018

Don't explode when a non-logged in user visits /dashboard
When a non-logged-in user visits /dashboard, errors happen.  This PR
stops those errors happening by ensuring at the start of the request
to the dashboard view that there is a logged in user.

This fixes #4305

@rossjones rossjones added the Has PR label Jun 27, 2018

tino097 added a commit that referenced this issue Jul 23, 2018

Don't explode when a non-logged in user visits /dashboard
When a non-logged-in user visits /dashboard, errors happen.  This PR
stops those errors happening by ensuring at the start of the request
to the dashboard view that there is a logged in user.

This fixes #4305
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.