Merge with dafb175c9e8caa9aa13d6f1c69d57755b576ad27
authorcavaliet
Tue, 04 Nov 2014 18:04:49 +0100
changeset 1333 c59a51cf2dda
parent 1332 600dbe94e74c (current diff)
parent 1331 dafb175c9e8c (diff)
child 1334 87ac8f374705
Merge with dafb175c9e8caa9aa13d6f1c69d57755b576ad27
--- a/src/ldt/ldt/api/ldt/resources/content.py	Tue Nov 04 18:03:34 2014 +0100
+++ b/src/ldt/ldt/api/ldt/resources/content.py	Tue Nov 04 18:04:49 2014 +0100
@@ -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,