[Catalyst] check_user_roles [ $user ], @roles ?
Eden Cardim
edencardim at gmail.com
Wed Feb 4 16:37:27 GMT 2009
On Wed, Feb 4, 2009 at 10:50 AM, Felix Antonius Wilhelm Ostmann
<ostmann at websuche.de> wrote:
> From the code:
>
> if ( Scalar::Util::blessed( $roles[0] )
> && $roles[0]->isa("Catalyst::Authentication::User") )
> {
> $user = shift @roles;
> }
>
> $user ||= $c->user;
That particular bit means you need to feed it a blessed scalar,
namely, *an object*.
> i think you can give a string ... you must load the user into a user-object
> fit for the Authorization::Roles
Not if you want it to DTRT.
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkey http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://edenc.vox.com/ http://www.shadowcat.co.uk/servers/
More information about the Catalyst
mailing list