Esempio n. 1
0
    def get(self, request):
        """
        get:
        Get actions

        Retrieve all the registered actions with descriptions that data manager can use.
        """
        pk = int_from_request(request.GET, "project",
                              1)  # replace 1 to None, it's for debug only
        project = get_object_with_check_and_log(request, Project, pk=pk)
        self.check_object_permissions(request, project)
        return Response(get_all_actions(request.user))
Esempio n. 2
0
    def get(self, request):
        """
        get:
        Get actions

        Retrieve all the registered actions with descriptions that data manager can use.
        """
        pk = int_from_request(request.GET, "project", 1)  # replace 1 to None, it's for debug only
        project = get_object_with_check_and_log(request, Project, pk=pk)
        self.check_object_permissions(request, project)

        params = {
            'can_delete_tasks': True,
            'can_manage_annotations': True,
            'experimental_feature': False
        }

        return Response(get_all_actions(params))
Esempio n. 3
0
 def get(self, request):
     pk = int_from_request(request.GET, "project",
                           1)  # replace 1 to None, it's for debug only
     project = get_object_with_check_and_log(request, Project, pk=pk)
     self.check_object_permissions(request, project)
     return Response(get_all_actions(request.user, project))