On 28 Dec 2010, at 00:51, Harold Frayman wrote:
Hi
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
AllowedRole:
- hilevel
ACLDetachTo: /login/required
LoginRedirectMessage: Please Login to view this Action
Can you show me some of the actual code for this controller?
Are you inheriting of Catalyst::Controller::ActionRole?
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.
So the actionrole doesn't even seem to be fired at all.. That's
between you and ActionRole::ACL really - nothing to do with SimpleLogin.
But show me some actual code and I'll be happy to try to help :)
Cheers
t0m
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/