Skip to content

"Resource not found" when accessing "public" targets when logged out #1254

Description

@griffin-h

Describe the bug
Recent changes to the permissions system differentiate between "open" targets (available even when logged out), "public" targets (available to anyone logged in), and "private" targets (available only to certain users or groups). Before these changes, if a user accessed a target page without logging in, they would first be redirected to the login page. Now it seems that they are directly sent to a generic error page (see screenshot below) without being given the chance to log in.

To Reproduce
Steps to reproduce the behavior:

  1. Create a target with "public" permissions. Copy the link to the target detail page.
  2. Log out (or open a private browser window).
  3. Navigate to that target detail page.
  4. See error

Expected behavior
I would expect to be directed to a login page, e.g., [base_url]/accounts/login/?next=/targets/1650540785/

Screenshots
Image

Desktop (please complete the following information):

  • OS: macOS
  • Browser: Firefox
  • Version: 140.0.4
  • Python Version: 3.10

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

UserIssue Raised by a userbugSomething isn't working

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions