Skip to content
This repository was archived by the owner on Jul 23, 2025. It is now read-only.
This repository was archived by the owner on Jul 23, 2025. It is now read-only.

500 on report pages for unloggedin users #9

@dpoirier

Description

@dpoirier

Small bug when a user who's not logged in tries to link directly to a report page, or when a user's login times out. (Moved from https://github.com/theirc/CTS/issues/430)

  File "/var/www/cts/source/reports/views.py", line 60, in dispatch
    if not self.user_may_access(request.user):
  File "/var/www/cts/source/reports/views.py", line 57, in user_may_access
    return user.is_superuser or user.role != ROLE_PARTNER or cls.partners_may_access
  File "/var/www/cts/env/local/lib/python2.7/site-packages/django/utils/functional.py", line 225, in inner
    return func(self._wrapped, *args)
AttributeError: 'AnonymousUser' object has no attribute 'role'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions