Allowing a custom error page

Justin W Freeman - December 19, 2008 - 00:43
Project:HTTP authentication
Version:5.x-1.3
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review
Description

As the 403 page needs to be set to httpauth in order for this module to work correctly, users lose a way of setting a custom access denied page and using httpauth. I propose we fix this.

The patch uses much of the code from how core Drupal originally does access denied pages and just changes some of the variables. You'll notice it also uses the httpauth_site_403 variable, so when httpauth is installed and the old site_403 gets copied, it will continue to provide the user the same access denied page they previously configured.

There is a slight hack with having to change the global $_menu variable, but I see no way around this, because the menu has already been generated by this point and if you try to load a httpauth_site_403 URL that is in !$may_cache and uses arg(x) then it is unable to find this menu item.

AttachmentSize
httpauth_403_redirect.patch3.13 KB

#1

Justin W Freeman - January 8, 2009 - 21:57

Is this module still in development?

#2

ahoeben - November 9, 2009 - 08:47

Patch works as advertised. Using it on a production site.

 
 

Drupal is a registered trademark of Dries Buytaert.