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.
The user panel now looks for
DEBUG_TOOLBAR_USER_PANEL_SECURE
in the settings module. If set toTrue
, 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
andlogin_form
views, the djangoPermissionDenied
exception is raised.