indico / indico/indico

Forbidden is used instead of Unauthorized

Open
#5,785 6 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
2.1k
Forks
551
Avg merge
2d 9h
Merged PRs (30d)
21

Description

In `RHProtected` and `RequireUserMixin` `Forbidden` (403) exception is raised if the user is None.
However I think 'Unauthorized` (401) would be more appropriate in this case.

Contributor guide

Open the contributing guide

Research direction

Start by locating the definitions of RHProtected and RequireUserMixin and inspect how they raise HTTP exceptions when the user is None. Check the relevant existing tests or request handling, then verify that both paths use the expected status and that the test suite still passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
authentication
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.