def check_view_permissions(self):
        if self.action == 'retrieve':
            result = self.get_access_permissions().can_retrieve(self.request.user)
        elif self.action in ('metadata', 'list'):
            result = self.request.user.has_perm('motions.can_see')
        elif self.action in ('create', 'partial_update', 'update', 'destroy'):
            result = (self.request.user.has_perm('motions.can_see') and
                      self.request.user.has_perm('motions.can_manage'))
        else:
            result = False
        return result


# Views to generate PDFs
Returns True if the user has required permissions.
dataset/ETHPy150Open OpenSlides/OpenSlides/openslides/motions/views.py/WorkflowViewSet.check_view_permissions