za...@bcc190cf-cafb-0310-a4f2-bffc1f526a37  committed 493093a

[soc2009/admin-ui] The Kaplan-Moss commandeth that thou shalt not allow any ol' anonymous user to make arbitrary queries. And so it was done.

  • Participants
  • Parent commits d7da423
  • Branches soc2009/admin-ui

Comments (0)

Files changed (1)

File django/contrib/admin/views/

 from django.utils.encoding import smart_str
 from django.http import HttpResponse, HttpResponseNotFound
 from django.conf import settings
+from django.contrib.admin.views import staff_member_required
 def foreignkey_autocomplete(request, related_string_functions=None):
                 data = to_string_function(obj)
         return HttpResponse(data)
-    return HttpResponseNotFound()
+    return HttpResponseNotFound()
+foreignkey_autocomplete = staff_member_required(foreignkey_autocomplete)