Fudge supported_features in Htpasswd::User, and fix handling in the base class
[catagits/Catalyst-Authentication-Store-Htpasswd.git] / lib / Catalyst / Plugin / Authentication / Store / Htpasswd / User.pm
index a07771d..438f31a 100644 (file)
@@ -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;
 }
 
@@ -27,6 +29,7 @@ sub supported_features {
                        self_check => 1,
                },
                session => 1
+        roles => 1,
        };
 }