mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-24 09:28:38 -06:00
Remove old HTTP_ACTIONS
constant
This commit is contained in:
parent
67b6857745
commit
ed3f0846d3
@ -11,17 +11,6 @@ from utilities.permissions import resolve_permission
|
|||||||
from utilities.request import get_client_ip
|
from utilities.request import get_client_ip
|
||||||
|
|
||||||
|
|
||||||
HTTP_ACTIONS = {
|
|
||||||
'GET': 'view',
|
|
||||||
'OPTIONS': None,
|
|
||||||
'HEAD': 'view',
|
|
||||||
'POST': 'add',
|
|
||||||
'PUT': 'change',
|
|
||||||
'PATCH': 'change',
|
|
||||||
'DELETE': 'delete',
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
class TokenAuthentication(authentication.TokenAuthentication):
|
class TokenAuthentication(authentication.TokenAuthentication):
|
||||||
"""
|
"""
|
||||||
A custom authentication scheme which enforces Token expiration times and source IP restrictions.
|
A custom authentication scheme which enforces Token expiration times and source IP restrictions.
|
||||||
|
@ -19,8 +19,6 @@ __all__ = (
|
|||||||
'NetBoxModelViewSet',
|
'NetBoxModelViewSet',
|
||||||
)
|
)
|
||||||
|
|
||||||
from netbox.api.authentication import HTTP_ACTIONS
|
|
||||||
|
|
||||||
|
|
||||||
class BaseViewSet(GenericViewSet):
|
class BaseViewSet(GenericViewSet):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user