Make @superuser_required delegate to @login_required.

Review Request #12005 — Created Jan. 26, 2022 and submitted — Latest diff uploaded

Information

Review Board
master

Reviewers

We had implemented our own login-required functionality inside the
@superuser_required decorator, but this didn't handle some of the API
changes that have happened upstream in Django. This change updates it so
that we just delegate to the built-in @login_required first.

  • Ran unit tests.
  • Tested that accessing various admin pages (DB, siteconfig forms) when
    logged out correctly redirected to the login form, and then back to
    the expected page.

Diff Revision 1 (Latest)

Commits

First Last Summary ID Author
Make @superuser_required delegate to @login_required.
We had implemented our own login-required functionality inside the @superuser_required decorator, but this didn't handle some of the API changes that have happened upstream in Django. This change updates it so that we just delegate to the built-in @login_required first. Testing Done: Ran unit tests.
4ceb9071e7ee53abeb3f3a93b2646b905afcad4a David Trowbridge
reviewboard/admin/decorators.py
Loading...