add delete endpoint
This commit is contained in:
@@ -41,6 +41,12 @@ class TestCodeSign(TacticalTestCase):
|
||||
|
||||
self.check_not_authenticated("patch", self.url)
|
||||
|
||||
def test_delete_codesign(self):
|
||||
r = self.client.delete(self.url)
|
||||
self.assertEqual(r.status_code, 200)
|
||||
|
||||
self.check_not_authenticated("delete", self.url)
|
||||
|
||||
|
||||
class TestConsumers(TacticalTestCase):
|
||||
def setUp(self):
|
||||
|
||||
@@ -262,6 +262,10 @@ class CodeSign(APIView):
|
||||
send_agent_update_task.delay(agent_ids=agent_ids, token=token, force=True)
|
||||
return Response("Agents will be code signed shortly")
|
||||
|
||||
def delete(self, request):
|
||||
CodeSignToken.objects.all().delete()
|
||||
return Response("ok")
|
||||
|
||||
|
||||
class GetAddKeyStore(APIView):
|
||||
permission_classes = [IsAuthenticated, CoreSettingsPerms]
|
||||
|
||||
Reference in New Issue
Block a user