Mark & Jason,
Thanks for your feedback.
Mark Stosberg wrote:
Here's some initial feedback, along with a simple patch below that might get
clobbered 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 plugin
in a super class and sub-class it, but a sensible default would be nice.
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.
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.
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 it
to Perl.
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.
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/[email protected]/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]