Django

Code

Ticket #2747 (closed: fixed)

Opened 2 years ago

Last modified 2 years ago

[patch] send X-Headers for Doc Bookmarklets to logged in users

Reported by: Maximillian Dornseif <md@hudora.de> Assigned to: adrian
Milestone: Component: django.contrib.admin
Version: SVN Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

This patch makes /admin/doc/bookmarklets/ work for people without static IPs by returning the X-Headers not only to clients comming from STATIC_IPS. The X-Headers are sent to all logged in users with is_staff=True .

So basically the criterion is:

  if (request.META.get('REMOTE_ADDR') in settings.INTERNAL_IPS) \
     or (request.user.is_authenticated() and request.user.is_staff):

Nice for developers/admins who come from an dynamic IP.

Attachments

django-3764-XheaderDoc.diff.txt (2.5 kB) - added by anonymous on 09/16/06 13:25:06.

Change History

09/16/06 13:25:06 changed by anonymous

  • attachment django-3764-XheaderDoc.diff.txt added.

09/21/06 22:17:28 changed by mtredinnick

  • status changed from new to closed.
  • resolution set to fixed.

(In [3786]) Fixed #2747 -- Make X-Headers work for staff members. Admins with dyanmic IP addresses can now use bookmarklets. Thanks, Maximillian Dornseif.


Add/Change #2747 ([patch] send X-Headers for Doc Bookmarklets to logged in users)




Change Properties
Action