Opened 4 years ago

Closed 4 years ago

#31857 closed Bug (invalid)

Admin side_bar showing up in login form with django-otp.

Reported by: Fernando Cordeiro Owned by: nobody
Component: contrib.admin Version: 3.1
Severity: Normal Keywords: admin
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Fernando Cordeiro)

When I upgrade to Django 3.1, the new admin navbar started to appear in the login screen. Look:

https://ibb.co/Jm0BdX3

Please note I'm using the django_otp package, that overrides the django's admin.site.__class__ ith their own OTPAdminSite class. This only happens with that package.

Nevertheless, this could potentially be happening with any other package. Given how sensitive the admin information is, I believe it's safer to set AdminSite.enable_nav_sidebar to False so people's models are not exposed.

Attachments (1)

admin_nav_bar.png (18.7 KB ) - added by Fernando Cordeiro 4 years ago.
Snapshot of admin login with navbar activated

Download all attachments as: .zip

Change History (3)

by Fernando Cordeiro, 4 years ago

Attachment: admin_nav_bar.png added

Snapshot of admin login with navbar activated

comment:1 by Fernando Cordeiro, 4 years ago

Description: modified (diff)

comment:2 by Mariusz Felisiak, 4 years ago

Resolution: invalid
Status: newclosed
Summary: Admin side_bar showing up in login formAdmin side_bar showing up in login form with django-otp.

It's an issue in django-otp not is Django. enable_nav_sidebar can be easily set to False in OTPAdminSite, but IMO they should rather override nav-sidebar block in login.html (which is quite specific). Please report this in their issue tracker.

Moreover I don't think that django-otp supports Django 3.1, it's not tested.

Note: See TracTickets for help on using tickets.
Back to Top