Query: moosex::meta::method::authorized::checkroles
OS: osx
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
MooseX::Meta::Method::Authorized::CheckRoles(3) User Contributed Perl Documentation MooseX::Meta::Method::Authorized::CheckRoles(3)NAMEMooseX::Meta::Method::Authorized::CheckRoles - Check roles of the userDESCRIPTIONThis verifier module will check if the user has any of the roles defined in the "requires" attribute of the method. To get the user this module will call "user" on the object which is the invocant for this method, to get the roles it will call "roles" on the user object.METHODSauthorized_do($method, $code, @_) This is the method that does the actual verification. It only invokes the coderef after checking if the user has any of the required roles. It will die otherwise with a string like: Access Denied. User "johndoe" does not have any of the required roles ("foo") required to invoke method "bla" on class "My::ClassTest1". User roles are: ("foo","bar","baz") It will only show the user id if the user implements the method "id".SEE ALSOMooseX::AuthorizedMethods, Class::MOP::MethodAUTHORSDaniel Ruoso <daniel@ruoso.com> With help from rafl and doy from #moose.COPYRIGHT AND LICENSECopyright 2010 by Daniel Ruoso et al This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.16.2 2010-11-24 MooseX::Meta::Method::Authorized::CheckRoles(3)