src/ldt/ldt/ldt_utils/middleware/security.py
changeset 250 ff7ccbbba329
parent 249 5c5fab6d8ae8
child 251 81417fd477b0
--- a/src/ldt/ldt/ldt_utils/middleware/security.py	Wed Nov 23 16:20:20 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-from django.conf import settings
-from django.core.exceptions import MiddlewareNotUsed
-from ldt.ldt_utils.security import protect_models, unprotect_models
-
-class SecurityMiddleware(object):
-    
-    def __init__(self):
-        if not hasattr(settings, 'USE_GROUP_PERMISSIONS') or not settings.USE_GROUP_PERMISSIONS:
-            raise MiddlewareNotUsed()
-
-    # !! Will not work with concurrent requests
-    def process_request(self, request):    
-        protect_models(request)      
-    
-    def process_response(self, request, response):
-        unprotect_models(request)
-        
-        return response
\ No newline at end of file