Re: [Catalyst] Question on user role management

2011-05-17 Thread Jason Galea
> No I didn't even think that I could get that information that way, still > very new to Catalyst/MVC/OO programing.  I will give that a try, because it > is being stored into an array in your example I would still need to put it > in a stash and go through it with a FOR or FOREACH loop in my view

Re: [Catalyst] Question on user role management

2011-05-17 Thread Adam Jimerson
Hi Jason, No I didn't even think that I could get that information that way, still very new to Catalyst/MVC/OO programing. I will give that a try, because it is being stored into an array in your example I would still need to put it in a stash and go through it with a FOR or FOREACH loop in my vi

Re: [Catalyst] Question on user role management

2011-05-17 Thread Jason Galea
Hi Adam, have you tried using the roles method on the other users? my $user = $c->stash->{users_rs}->find({ uniqid => $uniqid }); die "No such user: $uniqid\n" if (!$user); my @roles = $user->roles; do you have a many_to_many defined in your user table class? eg __PACKAG

[Catalyst] Question on user role management

2011-05-16 Thread Adam Jimerson
I am trying to come up with a way to manage roles for users in my Catalyst app, I have a database structure much like what is used in Chapter 5 of the Catalyst::Manual::Tutorial < http://search.cpan.org/~bobtfish/Catalyst-Manual-5.8007/lib/Catalyst/Manual/Tutorial/05_Authentication.pod> where I hav