Am having some difficulty with the FORBIDDEN_RUNMODE param when using CAP::Authorization with CA::Dispatch. All my application classes inherit from a base class where I have defined the 'forbidden' runmode (using AutoRunmode syntax). But declaring FORBIDDEN_RUNMODE => 'forbidden' in authz->config() means that for some reason the classes loaded by CA::Dispatch - which all 'use base MyApp::Base' - can't find the forbidden() rm so return my error page instead.

So I looked at the documentation and found the CALLBACKS section, and wondered what would happen if I defined the authz_forbidden runmode in cgiapp_prerun() instead of using FORBIDDEN_RUNMODE in the config:

  $self->run_modes( authz_forbidden => 'forbidden' );

and this actually works, even though I'm using a version 4.xx CGI::Application - I get my forbidden() output rather than the error page. But is this the right way to use CAP::Authorization in this situation? Should I expect CAP::Auth to work out-of-the-box with CA::Dispatch?
--
Richard Jones

#####  CGI::Application community mailing list  ################
##                                                            ##
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp    ##
##                                                            ##
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:          http://cgiapp.erlbaum.net/                 ##
##                                                            ##
################################################################

Reply via email to