Commits

Anonymous committed 62994f2

Add staff memeber required decorator

  • Participants
  • Parent commits 9528355

Comments (0)

Files changed (1)

File cked/views.py

 from django.views.decorators.csrf import csrf_exempt
 from django.core.exceptions import ImproperlyConfigured
 from django.core.urlresolvers import reverse
+from django.contrib.admin.views.decorators import staff_member_required
 
 from cked import elFinder
 from cked.widgets import json_encode
 json_encode = json.JSONEncoder().encode
 
 
+@staff_member_required
 def elfinder(request):
     options = default_settings.ELFINDER_DEFAULT_OPTIONS.copy()
     options['url'] = reverse('cked_elfinder_connector')
     })
 
 
+@staff_member_required
 @csrf_exempt
 def elfinder_connector(request):
     elf = elFinder.connector(settings.ELFINDER_OPTIONS)