Mark & Jason, Thanks for your feedback. Mark Stosberg wrote:
What about including the rm_denied run-mode as the default and instead of having it return any html or text in the run-mode I could get it to throw the 403 Forbidden error message. That way, if anyone has their 403 Error redirect to a custom page, that code will take over.Here's some initial feedback, along with a simple patch below that might getclobbered by e-mail wrapping.I would include rm_denied() in the plugin, as well as hooking this into setup: $self->run_modes( 'rm_denied' => 'rm_denied' ); If people want a different "denied" run mode, they can load the pluginin a super class and sub-class it, but a sensible default would be nice.
Otherwise, instead of sub-classing C:A:P:RMAuth I could provide them with the config option to point to a *different* run-mode that resides in their standard module for when something goes wrong.
Although, if someone really wanted to sub-class C:A:P:RMAuth and re-write the rm_denied() run-mode they would still be able to.
This makes the most sense. I might play around with AnyData.pm (http://search.cpan.org/~jzucker/AnyData-0.10/AnyData.pm) and maybe just include an example in the docs of using AnyData to load a permission file, but not require AnyData or XML::Simple, etc inside the RMAuth package.I suggest having the config variables be in a Perl data structure format. People who want to use XML or any other format can convert itto Perl.
Also, provide some defaults so this can be skipped:
# init rm authorization
$self->rmauth_init
(
PERMISSIONS => $self->cfg('RM_PERMISSIONS'),
UNAUTH_RUNMODE => 'denied',
);
This also makes the most sense, although, maybe use:$permit = $self->cfg{'RM_PERMISSIONS'} ? $self->cfg{'RM_PERMISSIONS'} : $self->param('RM_PERMISSIONS');
Or something, so that if someone isn't using one of the Config Plugins, they can still just default store it in $self->param() and still get access to it by default.
I'll make a couple patches and revisions shortly and release it with some pod, etc.
Anyone else that has more suggestions, feedback or features let me know before i come out with a full release.
--
Steve Comrie
LEAD SOFTWARE ARCHITECT | OCTANE
T: 416.977.2525
F: 416.977.8481
355 ADELAIDE ST. W. SUITE 1B
TORONTO, ONTARIO M5V 1S2
WWW.OCTANE.TO <http://www.octane.to>
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.