jumpserver/apps/users/urls/api_urls.py

39 lines
1.6 KiB
Python
Raw Normal View History

2016-11-16 10:12:14 +00:00
#!/usr/bin/env python
# ~*~ coding: utf-8 ~*~
#
from __future__ import absolute_import
from django.conf.urls import url
from rest_framework_bulk.routes import BulkRouter
from .. import api
app_name = 'users'
router = BulkRouter()
2018-07-13 16:47:21 +00:00
router.register(r'users', api.UserViewSet, 'user')
router.register(r'groups', api.UserGroupViewSet, 'user-group')
2016-11-16 10:12:14 +00:00
urlpatterns = [
2017-07-10 02:26:17 +00:00
# url(r'', api.UserListView.as_view()),
2018-07-13 16:47:21 +00:00
url(r'^token/$', api.UserToken.as_view(), name='user-token'),
url(r'^connection-token/$', api.UserConnectionTokenApi.as_view(), name='connection-token'),
url(r'^profile/$', api.UserProfile.as_view(), name='user-profile'),
url(r'^auth/$', api.UserAuthApi.as_view(), name='user-auth'),
url(r'^otp/auth/$', api.UserOtpAuthApi.as_view(), name='user-otp-auth'),
url(r'^users/(?P<pk>[0-9a-zA-Z\-]{36})/password/$',
2018-01-23 02:36:20 +00:00
api.ChangeUserPasswordApi.as_view(), name='change-user-password'),
2018-07-13 16:47:21 +00:00
url(r'^users/(?P<pk>[0-9a-zA-Z\-]{36})/password/reset/$',
2017-01-17 08:34:47 +00:00
api.UserResetPasswordApi.as_view(), name='user-reset-password'),
2018-07-13 16:47:21 +00:00
url(r'^users/(?P<pk>[0-9a-zA-Z\-]{36})/pubkey/reset/$',
2017-01-17 08:34:47 +00:00
api.UserResetPKApi.as_view(), name='user-public-key-reset'),
2018-07-13 16:47:21 +00:00
url(r'^users/(?P<pk>[0-9a-zA-Z\-]{36})/pubkey/update/$',
2017-01-17 08:34:47 +00:00
api.UserUpdatePKApi.as_view(), name='user-public-key-update'),
2018-07-13 16:47:21 +00:00
url(r'^users/(?P<pk>[0-9a-zA-Z\-]{36})/groups/$',
2016-11-16 10:12:14 +00:00
api.UserUpdateGroupApi.as_view(), name='user-update-group'),
2018-07-13 16:47:21 +00:00
url(r'^groups/(?P<pk>[0-9a-zA-Z\-]{36})/users/$',
2016-11-16 10:12:14 +00:00
api.UserGroupUpdateUserApi.as_view(), name='user-group-update-user'),
]
urlpatterns += router.urls