def get(self): """ Retrieve all shot entries. Filters can be specified in the query string. """ criterions = query.get_query_criterions_from_request(request) if not permissions.has_manager_permissions(): user_service.check_criterions_has_task_related(criterions) return shots_service.get_shots(criterions)
def get(self): """ Retrieve all shots, adds project name and asset type name and all related tasks. """ criterions = query.get_query_criterions_from_request(request) if not permissions.has_manager_permissions(): user_service.check_criterions_has_task_related(criterions) return shots_service.get_shots_and_tasks(criterions)
def get(self): """ Retrieve all entities that are not shot or sequence. Adds project name and asset type name. """ criterions = query.get_query_criterions_from_request(request) if not permissions.has_manager_permissions(): user_service.check_criterions_has_task_related(criterions) return assets_service.all_assets(criterions)
def test_check_criterions_has_task_related(self): with self.assertRaises(permissions.PermissionDenied): user_service.check_criterions_has_task_related({}) with self.assertRaises(permissions.PermissionDenied): user_service.check_criterions_has_task_related({ "project_id": self.project_id }) self.task.assignees.append(self.user) self.task.save() self.assertTrue(user_service.check_criterions_has_task_related({ "project_id": self.project_id }))