[Catalyst] CatalystX::SimpleLogin with multiple roles

Harold Frayman harold at dominofilms.co.uk
Tue Dec 28 00:51:56 GMT 2010


I'm trying to use CatalystX::SimpleLogin with multiple roles via DBIx::Class and with Redirect.
What should happen, when a user is redirected to log in and does so but without the level of authorization required for the method they were trying to call?

For example. In Controller::A, method b ( :Path('/b') Args(0) ) is configured as
  Does: ACL
      - hilevel
  ACLDetachTo: /login/required
  LoginRedirectMessage: Please Login to view this Action

User, not logged in, addresses .../b and is presented with the login form (as expected and desired). They identify themselves correctly but have only one role: lolevel, which is not authorised to use method b.

What seems to happen for me is that either (1) if there exists a template a/b.tt, irs contents are displayed even though the user is not auhtorised or (2) if the template specified is anything else or not specified (eg use $c->res->body), we get an error "Couldn't render template "a/b.tt: file error - a/b.tt: not found" -- which is true but unhelpful.

I've tried wrapping redirect but without success. Any ideas?


More information about the Catalyst mailing list