Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1""" 

2 

3Abstract 

4-------- 

5 

6The impersonation app allows authorized users to impersonate other users. 

7 

8Install 

9------- 

10 

111. Add ``'superdjango.contrib.accounts.impersonation.apps.DefaultConfig',`` to your ``INSTALLED_APPS``. 

122. Add ``'superdjango.contrib.accounts.impersonation.middleware.UserImpersonationMiddleware',`` to your list of 

13 ``MIDDLEWARE``. 

143. Add ``'superdjango.contrib.accounts.impersonation.context_processors.user_is_allowed_to_impersonate',`` to your 

15 context processors. 

164. Add ``url(r'^accounts/impersonation/', include("superdjango.contrib.accounts.impersonation.urls")),`` to your 

17 ``urls.py`` file. (Or use `AccountsViewSet`.) 

185. Include ``accounts/includes/user_impersonation_link.html`` somewhere in your base template, or recreate the link in 

19 the area of your choice. 

20 

21If you do not wish for staff users to be able to impersonate users, then set 

22``SUPERDJANGO_USER_IMPERSONATION_ENABLED_FOR_STAFF`` to ``False`` in ``settings.py``. 

23 

24You may also specify specific groups that are allowed to impersonate in ``settings.py``: 

25 

26.. code-block:: python 

27 

28 SUPERDJANGO_USER_IMPERSONATION_ENABLED_FOR_GROUPS = ["Advisers", "Managers", "Trainers"] 

29 

30To enable database logging, you must provide a model. See ``ImpersonationHistoryModel`` as a starting point. Then set 

31``SUPERDJANGO_USER_IMPERSONATION_MODEL = "my_app_label.MyImpersonation"`` in ``settings.py``. 

32 

33""" 

34__author__ = "Shawn Davis <shawn@superdjango.com>" 

35__maintainer__ = "Shawn Davis <shawn@superdjango.com>" 

36__version__ = "0.3.1-d"