playfire/django-debug-toolbar-user-panel — pull request #6 by aaronmerriam (2011-12-06 19:19:53+00:00)
Title: New Feature: Force initial login as superuser (resubmission)

The user panel now looks for `DEBUG_TOOLBAR_USER_PANEL_SECURE` in the
settings module. If set to `True`, the user panel will only function if
logged in initially as a superuser. If the setting is not present, the
toolbar defaults to being enabled.

Added `process_request` method to panel which sets an 'enabled' flag on the session based
on whether the toolbar should be enabled or not.

Added conditional to content template to hide all forms and show a help
message if the panel is disabled.

Added logic to views to check if the toolbar should be disabled. In
primary view, an enabled flag has been added to the template context.
In the `login` and `login_form` views, the django `PermissionDenied`
exception is raised.