Closed (fixed)
Project:
Customerror
Version:
7.x-1.3
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
17 Jan 2011 at 22:24 UTC
Updated:
1 Dec 2014 at 08:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
donquixote commentedIssue is about 403 (access denied), not 404.
Comment #2
gisleThanks for the suggestion. However adding this type of functionality is beyond the scope of this basic module. Since this feature request hasn't moved in two years, it is now dropped from the issue queue.
Comment #3
kcannick commentedI've been looking for this same functionality for over a year.
I have a site with 3 levels of membership
authenticated users, basic members and premium members. I can control access with TAC but cannot for the life of me figure out how to show an informative message upon 403.
examples:
"You must be Registered to access this page." for pages requiring authenticated user role
"Basic Membership required... Click Here to Upgrade" for pages requiring "Basic" user role
"Premium Membership required... Click Here to Upgrade" for pages requiring "Premium" user role
Comment #4
mlncn commentedProposing a compromise to this feature request!
The original example, providing an alternate 403 error message to authenticated users versus anonymous users, has been implemented in this module building on Custom Error: https://www.drupal.org/sandbox/mlncn/customerroralt
The catch is it needs the attached three-line patch in order to work. It allows customerroralt to provide an alternate 'code' for just the last three steps which use the code in variable_get() commands. This is after the real code has already been provided to the headers sent by Drupal.
I'd be happy to contribute customerroralt as a submodule for customerror or as a separate project, and to accept patches there to provide a custom error page title and message per role.
Comment #6
gisleThanks for the patch mlncn! It has now been commited to the 7.x-1.x dev branch. I'll push it as a regular release as soon as a third user reviews it and gives it status RTBC.
I am happy to accept customerroralt as a submodule for customerror. However, I am not the project owner, so I cannot grant you co-maintainer status, which means that you shall not be able to maintain it directly.
You may ask the owner (kbahey) to be made a co-maintainer of customerror, or you may want to set it up as a separate project.
Comment #7
mlncn commentedAwesome, thank you!
Yes, i would like customerroralt to be taken as a submodule. Would you like me to create a patch with it?
I'd accept co-maintainership to help out with this and other aspects (such as #2339349: Do not show PHP checkboxes unless PHP Filter module is enabled!) but am not seeking it. Thanks!
Comment #8
gisleNo need to create a patch, I have the sub-module already. It will be include it in the next nightly release.
Comment #12
mlncn commentedGisle, you rock. Thank you.
Comment #13
gisleFixed in release 7.x-1.3.