X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FPlugin%2FAuthentication%2FStore%2FHtpasswd%2FUser.pm;h=ad5d17cc249681256267cf2782a268d203d06921;hb=0fed016a9dac029577ec85b485a0446f7e6507c4;hp=a07771d9c8c619705598fb673097d8621ebeeb52;hpb=f3ed9b8405f77d8a75287a5afde95bd3cd9dd156;p=catagits%2FCatalyst-Authentication-Store-Htpasswd.git diff --git a/lib/Catalyst/Plugin/Authentication/Store/Htpasswd/User.pm b/lib/Catalyst/Plugin/Authentication/Store/Htpasswd/User.pm index a07771d..ad5d17c 100644 --- a/lib/Catalyst/Plugin/Authentication/Store/Htpasswd/User.pm +++ b/lib/Catalyst/Plugin/Authentication/Store/Htpasswd/User.pm @@ -13,6 +13,8 @@ use overload '""' => sub { shift->id }, fallback => 1; sub new { my ( $class, $store, $user ) = @_; + return unless $user; + bless { store => $store, user => $user }, $class; } @@ -26,7 +28,8 @@ sub supported_features { password => { self_check => 1, }, - session => 1 + session => 1, + roles => 1, }; }