Commits

Luke Plant committed cf12f11

Added protection to the officers/info page.

  • Participants
  • Parent commits 808cc71

Comments (0)

Files changed (2)

File cciw/officers/urls.py

 from django.conf.urls.defaults import patterns, url
-from django.views.generic.base import TemplateView
 
 urlpatterns = patterns('cciw.officers.views',
     (r'^$', 'index'),
     (r'^ref/thanks/$', 'create_reference_thanks'),
     (r'^add-officer/$', 'create_officer'),
     (r'^files/(.*)$', 'officer_files'),
-    url(r'^info/$', TemplateView.as_view(template_name='cciw/officers/info.html'), name="cciw.officers.views.info"),
+    url(r'^info/$', 'officer_info', name="cciw.officers.views.info"),
 )

File cciw/officers/views.py

 from django.template.loader import render_to_string
 from django.template.defaultfilters import wordwrap
 from django.views.decorators.cache import never_cache
+from django.views.generic.base import TemplateView
 
 from cciw.cciwmain import common
 from cciw.cciwmain.decorators import json_response
     c['officer'] = officer
     c['is_popup'] = True
     return render(request, 'cciw/officers/crb_consent_problem.html', c)
+
+
+officer_info = staff_member_required(TemplateView.as_view(template_name='cciw/officers/info.html'))