Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#2747 closed enhancement (fixed)

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

Reported by: Maximillian Dornseif <md@…> Owned by: Adrian Holovaty
Component: contrib.admin Version: dev
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

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 (1)

django-3764-XheaderDoc.diff.txt (2.5 KB ) - added by anonymous 18 years ago.

Download all attachments as: .zip

Change History (2)

by anonymous, 18 years ago

comment:1 by Malcolm Tredinnick, 18 years ago

Resolution: fixed
Status: newclosed

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

Note: See TracTickets for help on using tickets.
Back to Top