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 · Fixed by #4307
Closed

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

rossjones opened this issue Jun 26, 2018 · 0 comments · Fixed by #4307
Assignees

Comments

@rossjones
Copy link
Contributor

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
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
tino097 pushed a commit that referenced this issue Jul 23, 2018
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
fostermh pushed a commit to cioos-siooc/ckan that referenced this issue Sep 10, 2021
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 ckan#4305
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant