Allow authentication to get content info.
--- a/src/ldt/ldt/api/ldt/resources/content.py Thu Oct 16 16:18:20 2014 +0200
+++ b/src/ldt/ldt/api/ldt/resources/content.py Sat Oct 25 06:59:46 2014 +0200
@@ -8,6 +8,8 @@
from tastypie import fields
from tastypie.resources import Bundle, ModelResource, ALL_WITH_RELATIONS, ALL
+from ldt.api.ldt.authentication import (SessionAuthentication,
+ MultiAuthentication, ApiKeyAuthentication)
from ldt.indexation import get_results_list
from ldt.ldt_utils.models import Content, Media, Project, Segment
from ldt.ldt_utils.projectserializer import ProjectJsonSerializer, ProjectMerger
@@ -39,6 +41,7 @@
class Meta:
allowed_methods = ['get']
resource_name = 'contents'
+ authentication = MultiAuthentication(ApiKeyAuthentication(), SessionAuthentication())
queryset = Content.objects.select_related('front_project','media_obj').all()
filtering = {
'tags' : ALL_WITH_RELATIONS,