- or download this
# In MyApp::Schema::Class
=item B<has_role>
...
}
return;
}
- or download this
# in MyApp::Schema::Role
use overload '""' => sub {
return +shift->name;
}, fallback => 1;
- or download this
if ( $user->has_role("admin") )
{
# authorized for admin stuff...
}
- or download this
MyApp::Schema::Result::User
MyApp::Schema::Result::Role
MyApp::Schema::Result::UserRole