django/django — pull request #3762 by ttanner (2014-12-20 17:22:23+00:00)
Title: #24032 use has_permission instead of explicit is_staff for AdminSite

AdminSite currently requires users to have is_staff explicitly set in order to login, i.e. only staff members can login.
The way it is hardcoded in AdminSite and its templates makes it difficult to create custom AdminSites which allow certain non-staff members (e.g. with special permissions) to login.

With this PR, custom AdminSites only need to override has_permission and login_form to change the login requirements.

ticket https://code.djangoproject.com/ticket/24032