api : avoid PUT request with a list of projects.
--- a/src/ldt/ldt/api/ldt/resources/project.py Wed Jan 16 05:34:32 2013 +0100
+++ b/src/ldt/ldt/api/ldt/resources/project.py Thu Jan 17 11:35:19 2013 +0100
@@ -11,6 +11,7 @@
from tastypie.authorization import Authorization
from tastypie.resources import Bundle, ModelResource, ALL
from tastypie import fields
+from tastypie.exceptions import BadRequest
class ProjectResource(ModelResource):
@@ -63,4 +64,7 @@
assign('ldt_utils.view_project', everyone, bundle.obj)
protect_models()
return bundle
+
+ def obj_delete_list(self, request=None, **kwargs):
+ raise BadRequest("PUT with a list of projects is forbidden.")
\ No newline at end of file