[Catalyst] How to use and maintain sessions in catalyst...please check out my code...

Yuval Kogman nothingmuch at woobling.org
Wed Jan 4 11:46:54 CET 2006


On Wed, Jan 04, 2006 at 13:39:37 +0530, Vidya Sagar wrote:
> Thank you for ur reply.....I am using
> 
> use Catalyst qw/-Debug Session::FastMmap Static Authentication::CDBI /;
> 
> so shall i have to include other packages that are providing sessions by
> default......

The session management has been rewritten. You should use

	use Catalyst qw/
		-Debug
		
		Session
		Session::Store::FastMmap
		Session::State::Cookie

		Authentication
		Authentication::Store::DBIC
		Authentication::Credential::Simple
	/;

and I also suggest you replace 'Static' with 'Static::Simple' =)

	http://catalyst.perl.org/calendar/2005/15

contains an introduction to sessions

This requires an update to Catalyst 5.61, too.

If you don't want to update your application, then in the old code
just add

	if ( $user->role eq "admin" ) {
		...
	} else {
		$c->detach("/auth/access_denied");
	}

-- 
 ()  Yuval Kogman <nothingmuch at woobling.org> 0xEBD27418  perl hacker &
 /\  kung foo master: /me tips over a cow: neeyah!!!!!!!!!!!!!!!!!!!!!!




More information about the Catalyst mailing list