[Catalyst] check_user_roles [ $user ], @roles ?
Felix Antonius Wilhelm Ostmann
ostmann at websuche.de
Wed Feb 4 17:06:41 GMT 2009
Eden Cardim schrieb:
> 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
>>
>
>
uh, that should be a "can't give a string" :( damn!
> Not if you want it to DTRT.
>
>
--
Mit freundlichen Grüßen
Felix Antonius Wilhelm Ostmann
--------------------------------------------------
Websuche Search Technology GmbH & Co. KG
Martinistraße 3 - D-49080 Osnabrück - Germany
Tel.: +49 541 40666-0 - Fax: +49 541 40666-22
Email: info at websuche.de - Website: www.websuche.de
--------------------------------------------------
AG Osnabrück - HRA 200252 - Ust-Ident: DE814737310
Komplementärin: Websuche Search Technology
Verwaltungs GmbH - AG Osnabrück - HRB 200359
Geschäftsführer: Diplom Kaufmann Martin Steinkamp
--------------------------------------------------
More information about the Catalyst
mailing list