From ed3f0846d3f7d913c18700067aca328b6159f10b Mon Sep 17 00:00:00 2001 From: Daniel Sheppard Date: Mon, 17 Jun 2024 10:57:15 -0500 Subject: [PATCH] Remove old `HTTP_ACTIONS` constant --- netbox/netbox/api/authentication.py | 11 ----------- netbox/netbox/api/viewsets/__init__.py | 2 -- 2 files changed, 13 deletions(-) diff --git a/netbox/netbox/api/authentication.py b/netbox/netbox/api/authentication.py index 90119931b..ef307775b 100644 --- a/netbox/netbox/api/authentication.py +++ b/netbox/netbox/api/authentication.py @@ -11,17 +11,6 @@ from utilities.permissions import resolve_permission 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): """ A custom authentication scheme which enforces Token expiration times and source IP restrictions. diff --git a/netbox/netbox/api/viewsets/__init__.py b/netbox/netbox/api/viewsets/__init__.py index b5bdffa47..f0a8f04b9 100644 --- a/netbox/netbox/api/viewsets/__init__.py +++ b/netbox/netbox/api/viewsets/__init__.py @@ -19,8 +19,6 @@ __all__ = ( 'NetBoxModelViewSet', ) -from netbox.api.authentication import HTTP_ACTIONS - class BaseViewSet(GenericViewSet): """