-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c6551fb
commit d5deef2
Showing
3 changed files
with
9 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,7 @@ | ||
from django.dispatch import Signal | ||
|
||
# signal sent when an impersonation session begins | ||
session_begin = Signal( | ||
providing_args=['impersonator', 'impersonating', 'request'] | ||
) | ||
session_begin = Signal() | ||
|
||
# signal sent when an impersonation session ends | ||
session_end = Signal( | ||
providing_args=['impersonator', 'impersonating', 'request'] | ||
) | ||
session_end = Signal() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,21 @@ | ||
from django.conf.urls import url | ||
from django.urls import re_path | ||
|
||
from .views import impersonate, list_users, search_users, stop_impersonate | ||
|
||
try: | ||
# Django <=1.9 | ||
from django.conf.urls import patterns | ||
except ImportError: | ||
patterns = None | ||
|
||
urlpatterns = [ | ||
url(r'^stop/$', | ||
re_path(r'^stop/$', | ||
stop_impersonate, | ||
name='impersonate-stop'), | ||
url(r'^list/$', | ||
re_path(r'^list/$', | ||
list_users, | ||
{'template': 'impersonate/list_users.html'}, | ||
name='impersonate-list'), | ||
url(r'^search/$', | ||
re_path(r'^search/$', | ||
search_users, | ||
{'template': 'impersonate/search_users.html'}, | ||
name='impersonate-search'), | ||
url(r'^(?P<uid>.+)/$', | ||
re_path(r'^(?P<uid>.+)/$', | ||
impersonate, | ||
name='impersonate-start'), | ||
] | ||
|
||
if patterns is not None: | ||
urlpatterns = patterns('', *urlpatterns) |