From 1b15f6ea1498d55e5553e7a00c43873ddb420fb0 Mon Sep 17 00:00:00 2001 From: FinnStutzenstein Date: Mon, 29 Apr 2019 08:25:41 +0200 Subject: [PATCH] prohibit changes in projectiondefaults resolves question in #4541 --- openslides/core/views.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/openslides/core/views.py b/openslides/core/views.py index e15087e55..3c2e00047 100644 --- a/openslides/core/views.py +++ b/openslides/core/views.py @@ -288,12 +288,12 @@ class ProjectorViewSet(ModelViewSet): return Response({"detail": message}) -class ProjectionDefaultViewSet(ModelViewSet): +class ProjectionDefaultViewSet(ListModelMixin, RetrieveModelMixin, GenericViewSet): """ API endpoint for projection defaults. - There are the following views: list, retrieve, create, update, - partial_update and destroy. + There are the following views: list, and retrieve. Assigning projection defaults + to projectors can be done by updating the projector. """ access_permissions = ProjectionDefaultAccessPermissions() @@ -305,8 +305,6 @@ class ProjectionDefaultViewSet(ModelViewSet): """ if self.action in ("list", "retrieve"): result = self.get_access_permissions().check_permissions(self.request.user) - elif self.action in ("create", "partial_update", "update", "destroy"): - result = has_perm(self.request.user, "core.can_manage_projector") else: result = False return result