Subject: | Incompatible with CAP::ActionDispatch |
Date: | Thu, 02 Oct 2008 14:10:22 +0100 |
To: | bug-CGI-Application-Plugin-Authentication [...] rt.cpan.org |
From: | Ashley Hindmarsh <Ashley.Hindmarsh [...] bbc.co.uk> |
Hi there,
I just tried to use CAP::Authentication after using CAP::ActionDispatch,
and it failed to pick-up the protected runmodes.
Using the perl debugger to trace the problem, I found that in the
CAP::Auth prerun_callback method, a call to $self->get_current_runmode,
which isn't set by the CAP::ActionDispatch hook which has already
executed.
However, $self->prerun_mode has the correct runmode set, and using this
this seems to work ok.
I'm new to CGI::App, so I'm not sure which Plugin is responsible for
this problem
sub prerun_callback {
...
# if ($authen->is_protected_runmode($self->get_current_runmode)) {
if ($authen->is_protected_runmode($self->prerun_mode)) {
...
Regards
Ashley Hindmarsh
http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.