ensure all apps have login_required decorator
[auf_rh_dae.git] / project / urls.py
index 60284fc..b010fce 100644 (file)
@@ -1,5 +1,5 @@
 # -*- encoding: utf-8 -*
-from django.conf.urls.defaults import patterns, include, handler500, handler404, url
+from urldecorators.defaults import patterns, include, handler500, handler404, url
 from django.conf import settings
 from django.contrib import admin
 from auf.django.emploi import settings as sett
@@ -29,9 +29,9 @@ urlpatterns = patterns(
         {'document_root': settings.PRIVE_MEDIA_ROOT}),
 
     # apps
-    (r'^dae/', include('project.dae.urls')),
-    (r'^recrutement/', include('recrutement.urls')),
-    (r'^rh/', include('project.rh.urls')),
+    url(r'^dae/', include('project.dae.urls'), decorators=['django.contrib.auth.decorators.login_required']),
+    url(r'^recrutement/', include('recrutement.urls'), decorators=['django.contrib.auth.decorators.login_required']),
+    url(r'^rh/', include('project.rh.urls'), decorators=['django.contrib.auth.decorators.login_required']),
 )
 
 if settings.DEBUG: