mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Add REST API endpoint for ObjectPermissions
This commit is contained in:
21
netbox/users/api/urls.py
Normal file
21
netbox/users/api/urls.py
Normal file
@ -0,0 +1,21 @@
|
||||
from rest_framework import routers
|
||||
|
||||
from . import views
|
||||
|
||||
|
||||
class UsersRootView(routers.APIRootView):
|
||||
"""
|
||||
Users API root view
|
||||
"""
|
||||
def get_view_name(self):
|
||||
return 'Users'
|
||||
|
||||
|
||||
router = routers.DefaultRouter()
|
||||
router.APIRootView = UsersRootView
|
||||
|
||||
# Permissions
|
||||
router.register('permissions', views.ObjectPermissionViewSet)
|
||||
|
||||
app_name = 'users-api'
|
||||
urlpatterns = router.urls
|
Reference in New Issue
Block a user