From: Jay Kuri Date: Mon, 27 Nov 2006 08:22:42 +0000 (+0000) Subject: minor tweaks and note to self X-Git-Tag: v0.1100~57 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ba48c9c3416791f0f3e6ae8130e6d9a7d99707d6;p=catagits%2FCatalyst-Authentication-Store-DBIx-Class.git minor tweaks and note to self --- diff --git a/lib/Catalyst/Plugin/Authentication/Store/DBIx/Class/Backend.pm b/lib/Catalyst/Plugin/Authentication/Store/DBIx/Class/Backend.pm index b5a38bb..b5f6f09 100644 --- a/lib/Catalyst/Plugin/Authentication/Store/DBIx/Class/Backend.pm +++ b/lib/Catalyst/Plugin/Authentication/Store/DBIx/Class/Backend.pm @@ -8,7 +8,7 @@ sub new { my ( $class, $config, $app ) = @_; ## figure out if we are overriding the default store user class. - my $storeclass = $config->{'store_user_class'} || "Catalyst::Plugin::Authentication::Store::DBIx::Class::User"; + my $storeuserclass = $config->{'store_user_class'} || "Catalyst::Plugin::Authentication::Store::DBIx::Class::User"; ## fields can be specified to be ignored during user location. This allows ## authinfo to contain the user info required to find the user, as well as the password @@ -18,18 +18,23 @@ sub new { push @{$config->{'ignore_fields_in_find'}}, ('searchargs', 'ignore_fields'); ## make sure the store class is loaded. - Catalyst::Utils::ensure_class_loaded( $storeclass ); + Catalyst::Utils::ensure_class_loaded( $storeuserclass ); my $self = {}; - $self->{config} = $config; - $self->{store_user_class} = $storeclass; + $self->{'config'} = $config; + $self->{'store_user_class'} = $storeuserclass; - #$self->{role_relation} ||= 'roles'; - #$self->{role_field} ||= 'role'; + #$self->{'role_relation'} ||= 'roles'; + #$self->{'role_field'} ||= 'role'; bless $self, $class; } +## --jk note to self: +## let's use DBICs get_columns method to return a hash and save / restore that +## from the session. Then we can respond to get() calls, etc. in most cases without +## resorting to a DB call. If user_object is called, THEN we can hit the DB and +## return a real object. sub from_session { my ( $self, $c, $frozenuser ) = @_;