Fix incorrect method name, thanks cmilfo!
[catagits/Catalyst-Plugin-Authentication.git] / lib / Catalyst / Plugin / Authentication.pm
index 3f80433..8dd1a19 100644 (file)
@@ -397,7 +397,7 @@ leverage this. Add the role authorization plugin:
     sub restricted : Local {
         my ( $self, $c ) = @_;
 
-        $c->detach("unauthorized") unless $c->check_roles("admin");
+        $c->detach("unauthorized") unless $c->check_user_roles("admin");
 
         # do something restricted here
     }