API updates
- Move all generic API classes definitions to the rest_api.generics module. - Update API status code on insufficient access for the apps: indexes, parsing, documents, metadata, ocr, permission, user management. - Update API tests. Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
@@ -5,10 +5,9 @@ from django.http import Http404
|
||||
from django.shortcuts import get_object_or_404
|
||||
|
||||
from actstream.models import Action, any_stream
|
||||
from rest_framework import generics
|
||||
|
||||
from mayan.apps.acls.models import AccessControlList
|
||||
from mayan.apps.rest_api.permissions import MayanPermission
|
||||
from mayan.apps.rest_api import generics
|
||||
|
||||
from .classes import EventType, EventTypeNamespace
|
||||
from .models import Notification
|
||||
@@ -119,7 +118,6 @@ class APIEventListView(generics.ListAPIView):
|
||||
get: Returns a list of all the available events.
|
||||
"""
|
||||
mayan_view_permissions = {'GET': (permission_events_view,)}
|
||||
permission_classes = (MayanPermission,)
|
||||
queryset = Action.objects.all()
|
||||
serializer_class = EventSerializer
|
||||
|
||||
|
||||
Reference in New Issue
Block a user