0004-django4-replaced-urls.url-with-url.re_path-equivalen.patch
src/authentic2/api_urls.py | ||
---|---|---|
14 | 14 |
# You should have received a copy of the GNU Affero General Public License |
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 |
from django.conf.urls import url
|
|
17 |
from django.urls import path, re_path
|
|
18 | 18 | |
19 | 19 |
from . import api_views |
20 | 20 | |
21 | 21 |
urlpatterns = [ |
22 |
url(r'^register/$', api_views.register, name='a2-api-register'),
|
|
23 |
url(r'^password-change/$', api_views.password_change, name='a2-api-password-change'),
|
|
24 |
url(r'^user/$', api_views.user, name='a2-api-user'),
|
|
25 |
url(
|
|
22 |
path('register/', api_views.register, name='a2-api-register'),
|
|
23 |
path('password-change/', api_views.password_change, name='a2-api-password-change'),
|
|
24 |
path('user/', api_views.user, name='a2-api-user'),
|
|
25 |
re_path(
|
|
26 | 26 |
r'^users/(?P<user_uuid>[\w+]*)/profiles/(?P<profile_type_slug>[^/]+)/$', |
27 | 27 |
api_views.user_profiles, |
28 | 28 |
name='a2-api-user-profiles', |
29 | 29 |
), |
30 |
url(
|
|
30 |
re_path(
|
|
31 | 31 |
r'^roles/(?P<role_uuid>[\w+]*)/members/$', |
32 | 32 |
api_views.roles_members, |
33 | 33 |
name='a2-api-role-members-list', |
34 | 34 |
), |
35 |
url(
|
|
35 |
re_path(
|
|
36 | 36 |
r'^roles/(?P<role_uuid>[\w+]*)/members/(?P<member_uuid>[^/]+)/$', |
37 | 37 |
api_views.role_membership, |
38 | 38 |
name='a2-api-role-member', |
39 | 39 |
), |
40 |
url(
|
|
40 |
re_path(
|
|
41 | 41 |
r'^roles/(?P<role_uuid>[\w+]*)/relationships/members/$', |
42 | 42 |
api_views.role_memberships, |
43 | 43 |
name='a2-api-role-members', |
44 | 44 |
), |
45 |
url(
|
|
45 |
re_path(
|
|
46 | 46 |
r'^roles/(?P<role_uuid>[0-9a-z]{32})/parents/$', |
47 | 47 |
api_views.roles_parents, |
48 | 48 |
name='a2-api-role-parents', |
49 | 49 |
), |
50 |
url(
|
|
50 |
re_path(
|
|
51 | 51 |
r'^roles/(?P<role_uuid>[0-9a-z]{32})/relationships/parents/$', |
52 | 52 |
api_views.roles_parents_relationships, |
53 | 53 |
name='a2-api-role-parents-relationships', |
54 | 54 |
), |
55 |
url(r'^check-password/$', api_views.check_password, name='a2-api-check-password'),
|
|
56 |
url(r'^check-api-client/$', api_views.check_api_client, name='a2-api-check-api-client'),
|
|
57 |
url(r'^validate-password/$', api_views.validate_password, name='a2-api-validate-password'),
|
|
58 |
url(r'^address-autocomplete/$', api_views.address_autocomplete, name='a2-api-address-autocomplete'),
|
|
55 |
path('check-password/', api_views.check_password, name='a2-api-check-password'),
|
|
56 |
path('check-api-client/', api_views.check_api_client, name='a2-api-check-api-client'),
|
|
57 |
path('validate-password/', api_views.validate_password, name='a2-api-validate-password'),
|
|
58 |
path('address-autocomplete/', api_views.address_autocomplete, name='a2-api-address-autocomplete'),
|
|
59 | 59 |
] |
60 | 60 | |
61 | 61 |
urlpatterns += api_views.router.urls |
src/authentic2/idp/saml/urls.py | ||
---|---|---|
14 | 14 |
# You should have received a copy of the GNU Affero General Public License |
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 |
from django.conf.urls import url
|
|
17 |
from django.urls import path, re_path
|
|
18 | 18 | |
19 | 19 |
from authentic2.idp.saml.saml2_endpoints import ( |
20 | 20 |
artifact, |
... | ... | |
32 | 32 |
from . import views |
33 | 33 | |
34 | 34 |
urlpatterns = [ |
35 |
url(r'^metadata$', metadata, name='a2-idp-saml-metadata'),
|
|
36 |
url(r'^sso$', sso, name='a2-idp-saml-sso'),
|
|
37 |
url(r'^continue$', continue_sso, name='a2-idp-saml-continue'),
|
|
38 |
url(r'^slo$', slo, name='a2-idp-saml-slo'),
|
|
39 |
url(r'^slo/soap$', slo_soap, name='a2-idp-saml-slo-soap'),
|
|
40 |
url(r'^idp_slo/(.*)$', idp_slo, name='a2-idp-saml-slo-idp'),
|
|
41 |
url(r'^slo_return$', slo_return, name='a2-idp-saml-slo-return'),
|
|
42 |
url(r'^finish_slo$', finish_slo, name='a2-idp-saml-finish-slo'),
|
|
43 |
url(r'^artifact$', artifact, name='a2-idp-saml-artifact'),
|
|
35 |
path('metadata', metadata, name='a2-idp-saml-metadata'),
|
|
36 |
path('sso', sso, name='a2-idp-saml-sso'),
|
|
37 |
path('continue', continue_sso, name='a2-idp-saml-continue'),
|
|
38 |
path('slo', slo, name='a2-idp-saml-slo'),
|
|
39 |
path('slo/soap', slo_soap, name='a2-idp-saml-slo-soap'),
|
|
40 |
re_path(r'^idp_slo/(.*)$', idp_slo, name='a2-idp-saml-slo-idp'),
|
|
41 |
path('slo_return', slo_return, name='a2-idp-saml-slo-return'),
|
|
42 |
path('finish_slo', finish_slo, name='a2-idp-saml-finish-slo'),
|
|
43 |
path('artifact', artifact, name='a2-idp-saml-artifact'),
|
|
44 | 44 |
# legacy endpoint, now it's prefered to pass the entity_id in a parameter |
45 |
url(r'^idp_sso/(.+)$', idp_sso, name='a2-idp-saml-idp-sso-named'),
|
|
46 |
url(r'^idp_sso/$', idp_sso, name='a2-idp-saml2-idp-sso'),
|
|
47 |
url(r'^federations/create/(?P<pk>\d+)/$', views.create_federation, name='a2-idp-saml2-federation-create'),
|
|
48 |
url(r'^federations/(?P<pk>\d+)/delete/$', views.delete_federation, name='a2-idp-saml2-federation-delete'),
|
|
45 |
re_path(r'^idp_sso/(.+)$', idp_sso, name='a2-idp-saml-idp-sso-named'),
|
|
46 |
path('idp_sso/', idp_sso, name='a2-idp-saml2-idp-sso'),
|
|
47 |
path('federations/create/<int:pk>/', views.create_federation, name='a2-idp-saml2-federation-create'),
|
|
48 |
path('federations/<int:pk>/delete/', views.delete_federation, name='a2-idp-saml2-federation-delete'),
|
|
49 | 49 |
] |
src/authentic2/idp/urls.py | ||
---|---|---|
14 | 14 |
# You should have received a copy of the GNU Affero General Public License |
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 |
from django.conf.urls import url
|
|
17 |
from django.urls import re_path
|
|
18 | 18 | |
19 | 19 |
from authentic2.idp.interactions import consent_federation |
20 | 20 | |
21 | 21 |
urlpatterns = [ |
22 |
url(r'^consent_federation', consent_federation, name='a2-consent-federation'),
|
|
22 |
re_path(r'^consent_federation', consent_federation, name='a2-consent-federation'),
|
|
23 | 23 |
] |
src/authentic2/manager/urls.py | ||
---|---|---|
14 | 14 |
# You should have received a copy of the GNU Affero General Public License |
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 |
from django.conf.urls import url
|
|
17 |
from django.urls import path, re_path
|
|
18 | 18 |
from django.views.i18n import JavaScriptCatalog |
19 | 19 | |
20 | 20 |
from authentic2.apps.authenticators.manager_urls import urlpatterns as authenticator_urlpatterns |
... | ... | |
27 | 27 |
utils.manager_login_required, |
28 | 28 |
[ |
29 | 29 |
# homepage |
30 |
url(r'^$', views.homepage, name='a2-manager-homepage'),
|
|
31 |
url(r'^me/$', user_views.me, name='a2-manager-me'),
|
|
30 |
path('', views.homepage, name='a2-manager-homepage'),
|
|
31 |
path('me/', user_views.me, name='a2-manager-me'),
|
|
32 | 32 |
# Authentic2 users |
33 |
url(r'^users/$', user_views.users, name='a2-manager-users'),
|
|
34 |
url(r'^users/export/(?P<format>csv)/$', user_views.users_export, name='a2-manager-users-export'),
|
|
35 |
url(
|
|
33 |
path('users/', user_views.users, name='a2-manager-users'),
|
|
34 |
re_path(r'^users/export/(?P<format>csv)/$', user_views.users_export, name='a2-manager-users-export'),
|
|
35 |
re_path(
|
|
36 | 36 |
r'^users/export/(?P<uuid>[a-z0-9-]+)/progress/$', |
37 | 37 |
user_views.users_export_progress, |
38 | 38 |
name='a2-manager-users-export-progress', |
39 | 39 |
), |
40 |
url(
|
|
40 |
re_path(
|
|
41 | 41 |
r'^users/export/(?P<uuid>[a-z0-9-]+)/$', |
42 | 42 |
user_views.users_export_file, |
43 | 43 |
name='a2-manager-users-export-file', |
44 | 44 |
), |
45 |
url(r'^users/add/$', user_views.user_add_default_ou, name='a2-manager-user-add-default-ou'),
|
|
46 |
url(r'^users/add/choose-ou/$', user_views.user_add_choose_ou, name='a2-manager-user-add-choose-ou'),
|
|
47 |
url(r'^users/import/$', user_views.user_imports, name='a2-manager-users-imports'),
|
|
48 |
url(
|
|
45 |
path('users/add/', user_views.user_add_default_ou, name='a2-manager-user-add-default-ou'),
|
|
46 |
path('users/add/choose-ou/', user_views.user_add_choose_ou, name='a2-manager-user-add-choose-ou'),
|
|
47 |
path('users/import/', user_views.user_imports, name='a2-manager-users-imports'),
|
|
48 |
re_path(
|
|
49 | 49 |
r'^users/import/(?P<uuid>[a-z0-9]+)/download/(?P<filename>.*)$', |
50 | 50 |
user_views.user_import, |
51 | 51 |
name='a2-manager-users-import-download', |
52 | 52 |
), |
53 |
url(r'^users/import/(?P<uuid>[a-z0-9]+)/$', user_views.user_import, name='a2-manager-users-import'), |
|
54 |
url( |
|
53 |
re_path( |
|
54 |
r'^users/import/(?P<uuid>[a-z0-9]+)/$', user_views.user_import, name='a2-manager-users-import' |
|
55 |
), |
|
56 |
re_path( |
|
55 | 57 |
r'^users/import/(?P<import_uuid>[a-z0-9]+)/(?P<report_uuid>[a-z0-9]+)/$', |
56 | 58 |
user_views.user_import_report, |
57 | 59 |
name='a2-manager-users-import-report', |
58 | 60 |
), |
59 |
url(r'^users/(?P<ou_pk>\d+)/add/$', user_views.user_add, name='a2-manager-user-add'),
|
|
60 |
url(r'^users/(?P<pk>\d+)/$', user_views.user_detail, name='a2-manager-user-detail'),
|
|
61 |
url(r'^users/(?P<pk>\d+)/edit/$', user_views.user_edit, name='a2-manager-user-edit'),
|
|
62 |
url(r'^users/(?P<pk>\d+)/delete/$', user_views.user_delete, name='a2-manager-user-delete'),
|
|
63 |
url(r'^users/(?P<pk>\d+)/roles/$', user_views.roles, name='a2-manager-user-roles'),
|
|
64 |
url(
|
|
65 |
r'^users/(?P<pk>\d+)/change-password/$',
|
|
61 |
path('users/<int:ou_pk>/add/', user_views.user_add, name='a2-manager-user-add'),
|
|
62 |
path('users/<int:pk>/', user_views.user_detail, name='a2-manager-user-detail'),
|
|
63 |
path('users/<int:pk>/edit/', user_views.user_edit, name='a2-manager-user-edit'),
|
|
64 |
path('users/<int:pk>/delete/', user_views.user_delete, name='a2-manager-user-delete'),
|
|
65 |
path('users/<int:pk>/roles/', user_views.roles, name='a2-manager-user-roles'),
|
|
66 |
path(
|
|
67 |
'users/<int:pk>/change-password/',
|
|
66 | 68 |
user_views.user_change_password, |
67 | 69 |
name='a2-manager-user-change-password', |
68 | 70 |
), |
69 |
url(
|
|
70 |
r'^users/(?P<pk>\d+)/change-email/$',
|
|
71 |
path(
|
|
72 |
'users/<int:pk>/change-email/',
|
|
71 | 73 |
user_views.user_change_email, |
72 | 74 |
name='a2-manager-user-change-email', |
73 | 75 |
), |
74 |
url(r'^users/(?P<pk>\d+)/su/$', user_views.su, name='a2-manager-user-su'),
|
|
75 |
url(
|
|
76 |
r'^users/(?P<pk>\d+)/authorizations/$',
|
|
76 |
path('users/<int:pk>/su/', user_views.su, name='a2-manager-user-su'),
|
|
77 |
path(
|
|
78 |
'users/<int:pk>/authorizations/',
|
|
77 | 79 |
user_views.user_authorizations, |
78 | 80 |
name='a2-manager-user-authorizations', |
79 | 81 |
), |
80 |
url(r'^users/(?P<pk>\d+)/journal/$', user_views.user_journal, name='a2-manager-user-journal'),
|
|
82 |
path('users/<int:pk>/journal/', user_views.user_journal, name='a2-manager-user-journal'),
|
|
81 | 83 |
# by uuid |
82 |
url(
|
|
84 |
re_path(
|
|
83 | 85 |
r'^users/uuid:(?P<slug>[a-z0-9]+)/$', |
84 | 86 |
user_views.user_detail, |
85 | 87 |
name='a2-manager-user-by-uuid-detail', |
86 | 88 |
), |
87 |
url(
|
|
89 |
re_path(
|
|
88 | 90 |
r'^users/uuid:(?P<slug>[a-z0-9]+)/edit/$', |
89 | 91 |
user_views.user_edit, |
90 | 92 |
name='a2-manager-user-by-uuid-edit', |
91 | 93 |
), |
92 |
url(
|
|
94 |
re_path(
|
|
93 | 95 |
r'^users/uuid:(?P<slug>[a-z0-9]+)/roles/$', user_views.roles, name='a2-manager-user-by-uuid-roles' |
94 | 96 |
), |
95 |
url(
|
|
97 |
re_path(
|
|
96 | 98 |
r'^users/uuid:(?P<slug>[a-z0-9]+)/change-password/$', |
97 | 99 |
user_views.user_change_password, |
98 | 100 |
name='a2-manager-user-by-uuid-change-password', |
99 | 101 |
), |
100 |
url(
|
|
102 |
re_path(
|
|
101 | 103 |
r'^users/uuid:(?P<slug>[a-z0-9]+)/change-email/$', |
102 | 104 |
user_views.user_change_email, |
103 | 105 |
name='a2-manager-user-by-uuid-change-email', |
104 | 106 |
), |
105 |
url(
|
|
107 |
re_path(
|
|
106 | 108 |
r'^users/uuid:(?P<slug>[a-z0-9]+)/journal/$', |
107 | 109 |
user_views.user_journal, |
108 | 110 |
name='a2-manager-user-journal', |
109 | 111 |
), |
110 | 112 |
# Authentic2 roles |
111 |
url(r'^roles/$', role_views.listing, name='a2-manager-roles'),
|
|
112 |
url(r'^roles/import/$', role_views.roles_import, name='a2-manager-roles-import'),
|
|
113 |
url(r'^roles/csv-import/$', role_views.roles_csv_import, name='a2-manager-roles-csv-import'),
|
|
114 |
url(
|
|
115 |
r'^roles/csv-import-sample/$',
|
|
113 |
path('roles/', role_views.listing, name='a2-manager-roles'),
|
|
114 |
path('roles/import/', role_views.roles_import, name='a2-manager-roles-import'),
|
|
115 |
path('roles/csv-import/', role_views.roles_csv_import, name='a2-manager-roles-csv-import'),
|
|
116 |
path(
|
|
117 |
'roles/csv-import-sample/',
|
|
116 | 118 |
role_views.roles_csv_import_sample, |
117 | 119 |
name='a2-manager-roles-csv-import-sample', |
118 | 120 |
), |
119 |
url(r'^roles/add/$', role_views.add, name='a2-manager-role-add'), |
|
120 |
url(r'^roles/export/(?P<format>csv|json)/$', role_views.export, name='a2-manager-roles-export'), |
|
121 |
url(r'^roles/journal/$', role_views.roles_journal, name='a2-manager-roles-journal'), |
|
122 |
url(r'^roles/(?P<pk>\d+)/$', role_views.members, name='a2-manager-role-members'), |
|
123 |
url(r'^roles/uuid:(?P<slug>[a-z0-9]+)/$', role_views.members, name='a2-manager-roles-by-uuid-detail'), |
|
124 |
url(r'^roles/(?P<pk>\d+)/children/$', role_views.children, name='a2-manager-role-children'), |
|
125 |
url(r'^roles/(?P<pk>\d+)/parents/$', role_views.parents, name='a2-manager-role-parents'), |
|
126 |
url( |
|
127 |
r'^roles/(?P<pk>\d+)/add-admin-user/$', |
|
121 |
path('roles/add/', role_views.add, name='a2-manager-role-add'), |
|
122 |
re_path(r'^roles/export/(?P<format>csv|json)/$', role_views.export, name='a2-manager-roles-export'), |
|
123 |
path('roles/journal/', role_views.roles_journal, name='a2-manager-roles-journal'), |
|
124 |
path('roles/<int:pk>/', role_views.members, name='a2-manager-role-members'), |
|
125 |
re_path( |
|
126 |
r'^roles/uuid:(?P<slug>[a-z0-9]+)/$', role_views.members, name='a2-manager-roles-by-uuid-detail' |
|
127 |
), |
|
128 |
path('roles/<int:pk>/children/', role_views.children, name='a2-manager-role-children'), |
|
129 |
path('roles/<int:pk>/parents/', role_views.parents, name='a2-manager-role-parents'), |
|
130 |
path( |
|
131 |
'roles/<int:pk>/add-admin-user/', |
|
128 | 132 |
role_views.add_admin_user, |
129 | 133 |
name='a2-manager-role-add-admin-user', |
130 | 134 |
), |
131 |
url(
|
|
132 |
r'^roles/(?P<pk>\d+)/remove-admin-user/(?P<user_pk>\d+)/$',
|
|
135 |
path(
|
|
136 |
'roles/<int:pk>/remove-admin-user/<int:user_pk>/',
|
|
133 | 137 |
role_views.remove_admin_user, |
134 | 138 |
name='a2-manager-role-remove-admin-user', |
135 | 139 |
), |
136 |
url(
|
|
137 |
r'^roles/(?P<pk>\d+)/add-admin-role/$',
|
|
140 |
path(
|
|
141 |
'roles/<int:pk>/add-admin-role/',
|
|
138 | 142 |
role_views.add_admin_role, |
139 | 143 |
name='a2-manager-role-add-admin-role', |
140 | 144 |
), |
141 |
url(
|
|
142 |
r'^roles/(?P<pk>\d+)/remove-admin-role/(?P<role_pk>\d+)/$',
|
|
145 |
path(
|
|
146 |
'roles/<int:pk>/remove-admin-role/<int:role_pk>/',
|
|
143 | 147 |
role_views.remove_admin_role, |
144 | 148 |
name='a2-manager-role-remove-admin-role', |
145 | 149 |
), |
146 |
url(
|
|
150 |
re_path(
|
|
147 | 151 |
r'^roles/(?P<pk>\d+)/export/(?P<format>csv)/$', |
148 | 152 |
role_views.members_export, |
149 | 153 |
name='a2-manager-role-members-export', |
150 | 154 |
), |
151 |
url(r'^roles/(?P<pk>\d+)/delete/$', role_views.delete, name='a2-manager-role-delete'),
|
|
152 |
url(r'^roles/(?P<pk>\d+)/edit/$', role_views.edit, name='a2-manager-role-edit'),
|
|
153 |
url(r'^roles/(?P<pk>\d+)/permissions/$', role_views.permissions, name='a2-manager-role-permissions'),
|
|
154 |
url(r'^roles/(?P<pk>\d+)/journal/$', role_views.journal, name='a2-manager-role-journal'),
|
|
155 |
url(
|
|
155 |
path('roles/<int:pk>/delete/', role_views.delete, name='a2-manager-role-delete'),
|
|
156 |
path('roles/<int:pk>/edit/', role_views.edit, name='a2-manager-role-edit'),
|
|
157 |
path('roles/<int:pk>/permissions/', role_views.permissions, name='a2-manager-role-permissions'),
|
|
158 |
path('roles/<int:pk>/journal/', role_views.journal, name='a2-manager-role-journal'),
|
|
159 |
re_path(
|
|
156 | 160 |
r'^roles/(?P<pk>\d+)/user-or-role-select2.json$', |
157 | 161 |
role_views.user_or_role_select2, |
158 | 162 |
name='user-or-role-select2-json', |
159 | 163 |
), |
160 | 164 |
# Authentic2 organizational units |
161 |
url(r'^organizational-units/$', ou_views.listing, name='a2-manager-ous'), |
|
162 |
url(r'^organizational-units/add/$', ou_views.add, name='a2-manager-ou-add'), |
|
163 |
url(r'^organizational-units/(?P<pk>\d+)/$', ou_views.detail, name='a2-manager-ou-detail'), |
|
164 |
url(r'^organizational-units/(?P<pk>\d+)/edit/$', ou_views.edit, name='a2-manager-ou-edit'), |
|
165 |
url(r'^organizational-units/(?P<pk>\d+)/delete/$', ou_views.delete, name='a2-manager-ou-delete'), |
|
166 |
url(r'^organizational-units/export/(?P<format>json)/$', ou_views.export, name='a2-manager-ou-export'), |
|
167 |
url(r'^organizational-units/import/$', ou_views.ous_import, name='a2-manager-ous-import'), |
|
165 |
path('organizational-units/', ou_views.listing, name='a2-manager-ous'), |
|
166 |
path('organizational-units/add/', ou_views.add, name='a2-manager-ou-add'), |
|
167 |
path('organizational-units/<int:pk>/', ou_views.detail, name='a2-manager-ou-detail'), |
|
168 |
path('organizational-units/<int:pk>/edit/', ou_views.edit, name='a2-manager-ou-edit'), |
|
169 |
path('organizational-units/<int:pk>/delete/', ou_views.delete, name='a2-manager-ou-delete'), |
|
170 |
re_path( |
|
171 |
r'^organizational-units/export/(?P<format>json)/$', ou_views.export, name='a2-manager-ou-export' |
|
172 |
), |
|
173 |
path('organizational-units/import/', ou_views.ous_import, name='a2-manager-ous-import'), |
|
168 | 174 |
# Services |
169 |
url(r'^services/$', service_views.listing, name='a2-manager-services'),
|
|
170 |
url(r'^services/(?P<service_pk>\d+)/$', service_views.service_detail, name='a2-manager-service'),
|
|
171 |
url(
|
|
172 |
r'^services/(?P<service_pk>\d+)/edit/$',
|
|
175 |
path('services/', service_views.listing, name='a2-manager-services'),
|
|
176 |
path('services/<int:service_pk>/', service_views.service_detail, name='a2-manager-service'),
|
|
177 |
path(
|
|
178 |
'services/<int:service_pk>/edit/',
|
|
173 | 179 |
service_views.edit_service, |
174 | 180 |
name='a2-manager-service-edit', |
175 | 181 |
), |
176 |
url(
|
|
177 |
r'^services/(?P<service_pk>\d+)/delete/$',
|
|
182 |
path(
|
|
183 |
'services/<int:service_pk>/delete/',
|
|
178 | 184 |
service_views.delete_service, |
179 | 185 |
name='a2-manager-service-delete', |
180 | 186 |
), # Journal |
181 |
url(r'^journal/$', journal_views.journal, name='a2-manager-journal'),
|
|
182 |
url(
|
|
183 |
r'^journal/event-types/$',
|
|
187 |
path('journal/', journal_views.journal, name='a2-manager-journal'),
|
|
188 |
path(
|
|
189 |
'journal/event-types/',
|
|
184 | 190 |
journal_views.journal_event_types, |
185 | 191 |
name='a2-manager-journal-event-types', |
186 | 192 |
), |
187 | 193 |
# backoffice menu as json |
188 |
url(r'^menu.json$', views.menu_json),
|
|
194 |
re_path(r'^menu.json$', views.menu_json),
|
|
189 | 195 |
# general management |
190 |
url(r'^site-export/$', views.site_export, name='a2-manager-site-export'),
|
|
191 |
url(r'^site-import/$', views.site_import, name='a2-manager-site-import'),
|
|
196 |
path('site-export/', views.site_export, name='a2-manager-site-export'),
|
|
197 |
path('site-import/', views.site_import, name='a2-manager-site-import'),
|
|
192 | 198 |
# technical information including ldap config |
193 |
url(r'^tech-info/$', views.tech_info, name='a2-manager-tech-info'),
|
|
199 |
path('tech-info/', views.tech_info, name='a2-manager-tech-info'),
|
|
194 | 200 |
], |
195 | 201 |
) |
196 | 202 | |
... | ... | |
198 | 204 |
urlpatterns += oidc_manager_urlpatterns |
199 | 205 | |
200 | 206 |
urlpatterns += [ |
201 |
url(
|
|
202 |
r'^jsi18n/$',
|
|
207 |
path(
|
|
208 |
'jsi18n/',
|
|
203 | 209 |
JavaScriptCatalog.as_view(packages=['authentic2.manager']), |
204 | 210 |
name='a2-manager-javascript-catalog', |
205 | 211 |
), |
206 |
url(r'^select2.json$', views.select2, name='django_select2-json'),
|
|
212 |
re_path(r'^select2.json$', views.select2, name='django_select2-json'),
|
|
207 | 213 |
] |
src/authentic2/urls.py | ||
---|---|---|
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 | 17 |
from django.conf import settings |
18 |
from django.conf.urls import include, url |
|
19 | 18 |
from django.contrib import admin |
20 | 19 |
from django.contrib.auth import views as dj_auth_views |
21 | 20 |
from django.contrib.auth.decorators import login_required |
22 | 21 |
from django.contrib.staticfiles.views import serve |
22 |
from django.urls import include, path, re_path |
|
23 | 23 |
from django.utils.translation import gettext_lazy as _ |
24 | 24 |
from django.views.decorators.clickjacking import xframe_options_deny |
25 | 25 |
from django.views.generic import RedirectView |
... | ... | |
39 | 39 |
admin.autodiscover() |
40 | 40 | |
41 | 41 |
accounts_urlpatterns = [ |
42 |
url(
|
|
42 |
re_path(
|
|
43 | 43 |
r'^activate/(?P<registration_token>[A-Za-z0-9_ -]+)/$', |
44 | 44 |
views.registration_completion, |
45 | 45 |
name='registration_activate', |
46 | 46 |
), |
47 |
url(r'^delete/$', login_required(views.AccountDeleteView.as_view()), name='delete_account'),
|
|
48 |
url(
|
|
47 |
path('delete/', login_required(views.AccountDeleteView.as_view()), name='delete_account'),
|
|
48 |
re_path(
|
|
49 | 49 |
r'validate-deletion/(?P<deletion_token>[\w: -]+)/$', |
50 | 50 |
views.ValidateDeletionView.as_view(), |
51 | 51 |
name='validate_deletion', |
52 | 52 |
), |
53 |
url(r'^logged-in/$', views.logged_in, name='logged-in'),
|
|
54 |
url(r'^edit/$', views.edit_profile, name='profile_edit'),
|
|
55 |
url(r'^edit/required/$', views.edit_required_profile, name='profile_required_edit'),
|
|
56 |
url(r'^edit/(?P<scope>[-\w]+)/$', views.edit_profile, name='profile_edit_with_scope'),
|
|
57 |
url(r'^change-email/$', views.email_change, name='email-change'),
|
|
58 |
url(r'^change-email/verify/$', views.email_change_verify, name='email-change-verify'),
|
|
59 |
url(
|
|
60 |
r'^consents/$',
|
|
53 |
path('logged-in/', views.logged_in, name='logged-in'),
|
|
54 |
path('edit/', views.edit_profile, name='profile_edit'),
|
|
55 |
path('edit/required/', views.edit_required_profile, name='profile_required_edit'),
|
|
56 |
re_path(r'^edit/(?P<scope>[-\w]+)/$', views.edit_profile, name='profile_edit_with_scope'),
|
|
57 |
path('change-email/', views.email_change, name='email-change'),
|
|
58 |
path('change-email/verify/', views.email_change_verify, name='email-change-verify'),
|
|
59 |
path(
|
|
60 |
'consents/',
|
|
61 | 61 |
login_required(views.consents), |
62 | 62 |
name='consents', |
63 | 63 |
), |
64 |
url(
|
|
65 |
r'^consents/(?P<pk>\d+)/delete/$',
|
|
64 |
path(
|
|
65 |
'consents/<int:pk>/delete/',
|
|
66 | 66 |
login_required(views.consent_delete), |
67 | 67 |
name='consent-delete', |
68 | 68 |
), |
69 |
url(r'^$', views.profile, name='account_management'),
|
|
69 |
path('', views.profile, name='account_management'),
|
|
70 | 70 |
# Password change |
71 |
url(r'^password/change/$', views.password_change, name='password_change'),
|
|
72 |
url(
|
|
73 |
r'^password/change/done/$',
|
|
71 |
path('password/change/', views.password_change, name='password_change'),
|
|
72 |
path(
|
|
73 |
'password/change/done/',
|
|
74 | 74 |
dj_auth_views.PasswordChangeDoneView.as_view(), |
75 | 75 |
name='password_change_done', |
76 | 76 |
), |
77 | 77 |
# permament redirections for views moved to root |
78 |
url(r'^register/$', RedirectView.as_view(permanent=True, pattern_name='registration_register')),
|
|
79 |
url(r'^register/complete/$', RedirectView.as_view(permanent=True, pattern_name='registration_complete')),
|
|
80 |
url(r'^register/closed/$', RedirectView.as_view(permanent=True, pattern_name='registration_disallowed')),
|
|
81 |
url(
|
|
78 |
path('register/', RedirectView.as_view(permanent=True, pattern_name='registration_register')),
|
|
79 |
path('register/complete/', RedirectView.as_view(permanent=True, pattern_name='registration_complete')),
|
|
80 |
path('register/closed/', RedirectView.as_view(permanent=True, pattern_name='registration_disallowed')),
|
|
81 |
re_path(
|
|
82 | 82 |
r'^password/reset/confirm/(?P<token>[A-Za-z0-9_ -]+)/$', |
83 | 83 |
RedirectView.as_view(permanent=True, pattern_name='password_reset_confirm'), |
84 | 84 |
), |
85 |
url(r'^password/reset/$', RedirectView.as_view(permanent=True, pattern_name='password_reset')),
|
|
86 |
url(
|
|
87 |
r'^password/reset/instructions/$',
|
|
85 |
path('password/reset/', RedirectView.as_view(permanent=True, pattern_name='password_reset')),
|
|
86 |
path(
|
|
87 |
'password/reset/instructions/',
|
|
88 | 88 |
RedirectView.as_view(permanent=True, pattern_name='password_reset_instructions'), |
89 | 89 |
), |
90 |
url(
|
|
90 |
re_path(
|
|
91 | 91 |
r'^password/reset/.*', |
92 | 92 |
RedirectView.as_view(permanent=True, pattern_name='invalid-password-reset-urls'), |
93 | 93 |
), |
94 | 94 |
] |
95 | 95 | |
96 | 96 |
urlpatterns = [ |
97 |
url(r'^$', views.homepage, name='auth_homepage'),
|
|
98 |
url(r'^login/$', views.login, name='auth_login'),
|
|
99 |
url(r'^login/token/(?P<token>[A-Za-z0-9_ -]+)/$', views.token_login, name='token_login'),
|
|
100 |
url(r'^logout/$', views.logout, name='auth_logout'),
|
|
101 |
url(r'^su/(?P<uuid>[A-Za-z0-9_-]+)/$', views.su, name='su'),
|
|
102 |
url(r'^accounts/', include(accounts_urlpatterns)),
|
|
103 |
url(r'^admin/', admin.site.urls),
|
|
104 |
url(r'^idp/', include('authentic2.idp.urls')),
|
|
105 |
url(r'^manage/', include('authentic2.manager.urls')),
|
|
106 |
url(r'^api/', include('authentic2.api_urls')),
|
|
107 |
url(r'^continue/$', views.display_message_and_continue, name='continue'),
|
|
108 |
url(r'^\.well-known/change-password$', RedirectView.as_view(pattern_name='password_change')),
|
|
97 |
path('', views.homepage, name='auth_homepage'),
|
|
98 |
path('login/', views.login, name='auth_login'),
|
|
99 |
re_path(r'^login/token/(?P<token>[A-Za-z0-9_ -]+)/$', views.token_login, name='token_login'),
|
|
100 |
path('logout/', views.logout, name='auth_logout'),
|
|
101 |
re_path(r'^su/(?P<uuid>[A-Za-z0-9_-]+)/$', views.su, name='su'),
|
|
102 |
re_path(r'^accounts/', include(accounts_urlpatterns)),
|
|
103 |
re_path(r'^admin/', admin.site.urls),
|
|
104 |
re_path(r'^idp/', include('authentic2.idp.urls')),
|
|
105 |
re_path(r'^manage/', include('authentic2.manager.urls')),
|
|
106 |
re_path(r'^api/', include('authentic2.api_urls')),
|
|
107 |
path('continue/', views.display_message_and_continue, name='continue'),
|
|
108 |
re_path(r'^\.well-known/change-password$', RedirectView.as_view(pattern_name='password_change')),
|
|
109 | 109 |
# Registration |
110 |
url(r'^register/$', views.RegistrationView.as_view(), name='registration_register'),
|
|
111 |
url(r'^register/complete/$', views.registration_complete, name='registration_complete'),
|
|
112 |
url(
|
|
113 |
r'^register/closed/$',
|
|
110 |
path('register/', views.RegistrationView.as_view(), name='registration_register'),
|
|
111 |
path('register/complete/', views.registration_complete, name='registration_complete'),
|
|
112 |
path(
|
|
113 |
'register/closed/',
|
|
114 | 114 |
TemplateView.as_view(template_name='registration/registration_closed.html'), |
115 | 115 |
name='registration_disallowed', |
116 | 116 |
), |
117 | 117 |
# Password reset |
118 |
url(
|
|
118 |
re_path(
|
|
119 | 119 |
r'^password/reset/confirm/(?P<token>[A-Za-z0-9_ -]+)/$', |
120 | 120 |
views.password_reset_confirm, |
121 | 121 |
name='password_reset_confirm', |
122 | 122 |
), |
123 |
url(r'^password/reset/$', views.password_reset, name='password_reset'),
|
|
124 |
url(
|
|
125 |
r'^password/reset/instructions/$',
|
|
123 |
path('password/reset/', views.password_reset, name='password_reset'),
|
|
124 |
path(
|
|
125 |
'password/reset/instructions/',
|
|
126 | 126 |
views.password_reset_instructions, |
127 | 127 |
name='password_reset_instructions', |
128 | 128 |
), |
129 |
url(
|
|
129 |
re_path(
|
|
130 | 130 |
r'^password/reset/.*', |
131 | 131 |
views.old_view_redirect, |
132 | 132 |
kwargs={ |
... | ... | |
146 | 146 |
pass |
147 | 147 | |
148 | 148 |
if settings.DEBUG: |
149 |
urlpatterns += [url(r'^static/(?P<path>.*)$', serve)]
|
|
150 |
urlpatterns += [url(r'^media/(?P<path>.*)$', media_serve, {'document_root': settings.MEDIA_ROOT})]
|
|
149 |
urlpatterns += [re_path(r'^static/(?P<path>.*)$', serve)]
|
|
150 |
urlpatterns += [re_path(r'^media/(?P<path>.*)$', media_serve, {'document_root': settings.MEDIA_ROOT})]
|
|
151 | 151 | |
152 | 152 |
if settings.DEBUG and 'debug_toolbar' in settings.INSTALLED_APPS: |
153 | 153 |
import debug_toolbar # pylint: disable=import-error |
154 | 154 | |
155 | 155 |
urlpatterns = [ |
156 |
url(r'^__debug__/', include(debug_toolbar.urls)),
|
|
156 |
re_path(r'^__debug__/', include(debug_toolbar.urls)),
|
|
157 | 157 |
] + urlpatterns |
158 | 158 | |
159 | 159 |
# prevent click-jacking on authentic views |
... | ... | |
163 | 163 | |
164 | 164 |
authentic2_idp_saml_urls = required( |
165 | 165 |
(setting_enabled('ENABLE', settings=authentic2.idp.saml.app_settings), lasso_required()), |
166 |
[url(r'^idp/saml2/', include('authentic2.idp.saml.urls'))],
|
|
166 |
[re_path(r'^idp/saml2/', include('authentic2.idp.saml.urls'))],
|
|
167 | 167 |
) |
168 | 168 | |
169 | 169 |
authentic2_idp_cas_urls = required( |
170 | 170 |
(setting_enabled('ENABLE', settings=authentic2_idp_cas.app_settings),), |
171 |
[url(r'^idp/cas/', include('authentic2_idp_cas.urls'))],
|
|
171 |
[re_path(r'^idp/cas/', include('authentic2_idp_cas.urls'))],
|
|
172 | 172 |
) |
173 | 173 | |
174 | 174 |
urlpatterns = ( |
src/authentic2_auth_fc/urls.py | ||
---|---|---|
14 | 14 |
# You should have received a copy of the GNU Affero General Public License |
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 |
from django.conf.urls import include, url
|
|
17 |
from django.urls import include, path, re_path
|
|
18 | 18 | |
19 | 19 |
from . import views |
20 | 20 | |
21 | 21 |
fcpatterns = [ |
22 |
url(r'^callback/$', views.login_or_link, name='fc-login-or-link'),
|
|
23 |
url(r'^callback_logout/$', views.logout, name='fc-logout'),
|
|
22 |
path('callback/', views.login_or_link, name='fc-login-or-link'),
|
|
23 |
path('callback_logout/', views.logout, name='fc-logout'),
|
|
24 | 24 |
] |
25 | 25 | |
26 | 26 |
urlpatterns = [ |
27 |
url(r'^fc/', include(fcpatterns)),
|
|
28 |
url(r'^accounts/fc/unlink/$', views.unlink, name='fc-unlink'),
|
|
27 |
re_path(r'^fc/', include(fcpatterns)),
|
|
28 |
path('accounts/fc/unlink/', views.unlink, name='fc-unlink'),
|
|
29 | 29 |
] |
src/authentic2_auth_oidc/urls.py | ||
---|---|---|
14 | 14 |
# You should have received a copy of the GNU Affero General Public License |
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 |
from django.conf.urls import url
|
|
17 |
from django.urls import path
|
|
18 | 18 | |
19 | 19 |
from . import views |
20 | 20 | |
21 | 21 |
urlpatterns = [ |
22 |
url(r'^accounts/oidc/login/(?P<pk>\d+)/$', views.oidc_login, name='oidc-login'),
|
|
23 |
url(r'^accounts/oidc/login/$', views.login_initiate, name='oidc-login-initiate'),
|
|
24 |
url(r'^accounts/oidc/callback/$', views.login_callback, name='oidc-login-callback'),
|
|
22 |
path('accounts/oidc/login/<int:pk>/', views.oidc_login, name='oidc-login'),
|
|
23 |
path('accounts/oidc/login/', views.login_initiate, name='oidc-login-initiate'),
|
|
24 |
path('accounts/oidc/callback/', views.login_callback, name='oidc-login-callback'),
|
|
25 | 25 |
] |
src/authentic2_auth_saml/urls.py | ||
---|---|---|
14 | 14 |
# You should have received a copy of the GNU Affero General Public License |
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 |
from django.conf.urls import include, url |
|
18 |
from django.urls import path |
|
17 |
from django.urls import include, path, re_path |
|
19 | 18 | |
20 | 19 |
from authentic2.apps.authenticators.manager_urls import superuser_login_required |
21 | 20 |
from authentic2.decorators import required |
... | ... | |
23 | 22 |
from . import views |
24 | 23 | |
25 | 24 |
urlpatterns = [ |
26 |
url(r'^accounts/saml/', include('mellon.urls'), kwargs={'template_base': 'authentic2/base.html'})
|
|
25 |
re_path(r'^accounts/saml/', include('mellon.urls'), kwargs={'template_base': 'authentic2/base.html'})
|
|
27 | 26 |
] |
28 | 27 | |
29 | 28 |
urlpatterns += required( |
src/authentic2_idp_cas/urls.py | ||
---|---|---|
14 | 14 |
# You should have received a copy of the GNU Affero General Public License |
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 |
from django.conf.urls import url
|
|
17 |
from django.urls import path, re_path
|
|
18 | 18 | |
19 | 19 |
from . import views |
20 | 20 | |
21 | 21 |
urlpatterns = [ |
22 |
url('^login/?$', views.login, name='a2-idp-cas-login'),
|
|
23 |
url('^continue/$', views._continue, name='a2-idp-cas-continue'),
|
|
24 |
url('^validate/?$', views.validate, name='a2-idp-cas-validate'),
|
|
25 |
url('^serviceValidate/?$', views.service_validate, name='a2-idp-cas-service-validate'),
|
|
26 |
url('^logout/?$', views.logout, name='a2-idp-cas-logout'),
|
|
27 |
url('^proxy/?$', views.proxy, name='a2-idp-cas-proxy'),
|
|
28 |
url('^proxyValidate/?$', views.proxy_validate, name='a2-idp-cas-proxy-validate'),
|
|
22 |
re_path('^login/?$', views.login, name='a2-idp-cas-login'),
|
|
23 |
path('continue/', views._continue, name='a2-idp-cas-continue'),
|
|
24 |
re_path('^validate/?$', views.validate, name='a2-idp-cas-validate'),
|
|
25 |
re_path('^serviceValidate/?$', views.service_validate, name='a2-idp-cas-service-validate'),
|
|
26 |
re_path('^logout/?$', views.logout, name='a2-idp-cas-logout'),
|
|
27 |
re_path('^proxy/?$', views.proxy, name='a2-idp-cas-proxy'),
|
|
28 |
re_path('^proxyValidate/?$', views.proxy_validate, name='a2-idp-cas-proxy-validate'),
|
|
29 | 29 |
] |
src/authentic2_idp_oidc/manager/urls.py | ||
---|---|---|
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 | 17 | |
18 |
from django.conf.urls import url
|
|
18 |
from django.urls import path
|
|
19 | 19 | |
20 | 20 |
from authentic2.decorators import required |
21 | 21 |
from authentic2.manager.utils import manager_login_required |
... | ... | |
25 | 25 |
urlpatterns = required( |
26 | 26 |
manager_login_required, |
27 | 27 |
[ |
28 |
url(r'^services/add-oidc/$', views.add_oidc_service, name='a2-manager-add-oidc-service'),
|
|
29 |
url(
|
|
30 |
r'^services/(?P<service_pk>\d+)/claim/add/$',
|
|
28 |
path('services/add-oidc/', views.add_oidc_service, name='a2-manager-add-oidc-service'),
|
|
29 |
path(
|
|
30 |
'services/<int:service_pk>/claim/add/',
|
|
31 | 31 |
views.oidc_claim_add, |
32 | 32 |
name='a2-manager-oidc-claim-add', |
33 | 33 |
), |
34 |
url(
|
|
35 |
r'^services/(?P<service_pk>\d+)/claim/(?P<claim_pk>\d+)/edit/$',
|
|
34 |
path(
|
|
35 |
'services/<int:service_pk>/claim/<int:claim_pk>/edit/',
|
|
36 | 36 |
views.oidc_claim_edit, |
37 | 37 |
name='a2-manager-oidc-claim-edit', |
38 | 38 |
), |
39 |
url(
|
|
40 |
r'^services/(?P<service_pk>\d+)/claim/(?P<claim_pk>\d+)/delete/$',
|
|
39 |
path(
|
|
40 |
'services/<int:service_pk>/claim/<int:claim_pk>/delete/',
|
|
41 | 41 |
views.oidc_claim_delete, |
42 | 42 |
name='a2-manager-oidc-claim-delete', |
43 | 43 |
), |
src/authentic2_idp_oidc/urls.py | ||
---|---|---|
14 | 14 |
# You should have received a copy of the GNU Affero General Public License |
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 |
from django.conf.urls import url
|
|
17 |
from django.urls import re_path
|
|
18 | 18 | |
19 | 19 |
from . import views |
20 | 20 | |
21 | 21 |
urlpatterns = [ |
22 |
url(r'^.well-known/openid-configuration$', views.openid_configuration, name='oidc-openid-configuration'), |
|
23 |
url(r'^idp/oidc/certs/?$', views.certs, name='oidc-certs'), |
|
24 |
url(r'^idp/oidc/authorize/?$', views.authorize, name='oidc-authorize'), |
|
25 |
url(r'^idp/oidc/token/?$', views.token, name='oidc-token'), |
|
26 |
url(r'^idp/oidc/user_info/?$', views.user_info, name='oidc-user-info'), |
|
27 |
url(r'^idp/oidc/logout/?$', views.logout, name='oidc-logout'), |
|
22 |
re_path( |
|
23 |
r'^.well-known/openid-configuration$', views.openid_configuration, name='oidc-openid-configuration' |
|
24 |
), |
|
25 |
re_path(r'^idp/oidc/certs/?$', views.certs, name='oidc-certs'), |
|
26 |
re_path(r'^idp/oidc/authorize/?$', views.authorize, name='oidc-authorize'), |
|
27 |
re_path(r'^idp/oidc/token/?$', views.token, name='oidc-token'), |
|
28 |
re_path(r'^idp/oidc/user_info/?$', views.user_info, name='oidc-user-info'), |
|
29 |
re_path(r'^idp/oidc/logout/?$', views.logout, name='oidc-logout'), |
|
28 | 30 |
] |
29 |
- |