Re: [Catalyst] How to get default()-like behavior outside of the Root controller

2015-02-09 Thread Dmitry L.
I'd rather split one application into several (admin app, survey app, etc) and join its via middleware. But you can try this: In MyApp::Admin: sub default : Path('admin') { # or # sub default : Chained(base) PathPart('') Path { my ( $self, $c ) = @_; $c-response-body( 'Page not found in

Re: [Catalyst] How to get default()-like behavior outside of the Root controller

2015-02-09 Thread Trevor Leffler
On 2/9/2015 1:59 AM, Dmitry L. wrote: I'd rather split one application into several (admin app, survey app, etc) and join its via middleware. But you can try this: In MyApp::Admin: sub default : Path('admin') { # or # sub default : Chained(base) PathPart('') Path { my ( $self, $c ) = @_;

Re: [Catalyst] question about authorization and roles

2015-02-09 Thread Jeffrey Black
Luca,   Perhaps it's a stupid question, but have you checked that the user exists?   if ( $c-user_exists() ... jb On Monday, February 9, 2015 7:53 AM, Luca Ferrari fluca1...@infinito.it wrote: Hi all, I'm trying to setup the authorization in an application, and therefore in my

Re: [Catalyst] question about authorization and roles

2015-02-09 Thread Luca Ferrari
Ciao, On Mon, Feb 9, 2015 at 6:12 PM, Jeff Black jeffrey.bl...@yahoo.com wrote: Perhaps it's a stupid question, but have you checked that the user exists? if ( $c-user_exists() ... Apparently it exists because I print the username and its role list to check...and of course the role is

Re: [Catalyst] How to get default()-like behavior outside of the Root controller

2015-02-09 Thread David Schmidt
On 9 February 2015 at 10:59, Dmitry L. dim0...@gmail.com wrote: I'd rather split one application into several (admin app, survey app, etc) and join its via middleware. I wrote a blog article a few months ago:

[Catalyst] question about authorization and roles

2015-02-09 Thread Luca Ferrari
Hi all, I'm trying to setup the authorization in an application, and therefore in my controller method I've something like the following: if ( ! $c-check_any_user_role( qw/Admin Manutentore/ ) ){ } and the above is always failing. At first I thought I was missing something with the role