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:
- Create a target with "public" permissions. Copy the link to the target detail page.
- Log out (or open a private browser window).
- Navigate to that target detail page.
- See error
Expected behavior
I would expect to be directed to a login page, e.g., [base_url]/accounts/login/?next=/targets/1650540785/
Screenshots

Desktop (please complete the following information):
- OS: macOS
- Browser: Firefox
- Version: 140.0.4
- Python Version: 3.10
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:
Expected behavior
I would expect to be directed to a login page, e.g., [base_url]/accounts/login/?next=/targets/1650540785/
Screenshots

Desktop (please complete the following information):