jumpserver/apps/perms/urls.py

33 lines
1.4 KiB
Python
Raw Normal View History

2016-09-11 01:50:42 +00:00
# coding:utf-8
from django.conf.urls import url
2016-09-11 01:50:42 +00:00
import views
2016-10-19 11:30:55 +00:00
import api
2016-09-11 01:50:42 +00:00
app_name = 'perms'
urlpatterns = [
2016-09-11 15:20:14 +00:00
url(r'^asset-permission$', views.AssetPermissionListView.as_view(), name='asset-permission-list'),
url(r'^asset-permission/create$', views.AssetPermissionCreateView.as_view(), name='asset-permission-create'),
url(r'^asset-permission/(?P<pk>[0-9]+)/update$', views.AssetPermissionUpdateView.as_view(),
name='asset-permission-update'),
url(r'^asset-permission/(?P<pk>[0-9]+)$', views.AssetPermissionDetailView.as_view(),
name='asset-permission-detail'),
url(r'^asset-permission/(?P<pk>[0-9]+)/delete$', views.AssetPermissionDeleteView.as_view(),
name='asset-permission-delete'),
2016-09-16 12:53:10 +00:00
url(r'^asset-permission/(?P<pk>[0-9]+)/user$', views.AssetPermissionUserView.as_view(),
name='asset-permission-user-list'),
2016-09-16 12:53:10 +00:00
url(r'^asset-permission/(?P<pk>[0-9]+)/asset$', views.AssetPermissionAssetView.as_view(),
name='asset-permission-asset-list'),
2016-09-11 01:50:42 +00:00
]
2016-10-19 11:30:55 +00:00
urlpatterns += [
2016-11-04 10:33:16 +00:00
url(r'^v1/asset-permission/$', api.AssetPermissionListCreateApi.as_view(),
name='asset-permission-list-create-api'),
2016-10-19 11:30:55 +00:00
url(r'^v1/user/assets/granted/$', api.UserAssetsGrantedApi.as_view(),
name='user-assets-granted'),
2016-11-04 10:33:16 +00:00
url(r'^v1/user/asset-groups/granted/$', api.UserAssetsGroupsGrantedApi.as_view(),
name='user-asset-groups-granted'),
2016-10-19 11:30:55 +00:00
]