Abilities
view release on metacpan or search on metacpan
Revision history for Abilities
0.5 2013-05-03 20:56:51 Asia/Jerusalem
[ BUGFIXES ]
- Fixed all bugs introduced in versions 0.3 and 0.4 that made this
package unusable (see the UPGRADING FROM v0.2 sections in both
Abilities.pm and Abilities/Features.pm for more info)
0.4 2013-05-02 21:06:25 Asia/Jerusalem
[ VARIOUS CHANGES ]
- Moved from Any::Moose to Moo as per the former's deprecation
[ BUGFIXES ]
- fixed _build_abilities() to skip non-blessed roles (submitted by cafe01)
- small documentation fixes
NOTE: In previous versions, this method was required to return an array
of role objects, not a list of role names. This has been changed in
version 0.3.
actions()
Returns a list of all action names that a user object has been
explicitely granted, or that a role object has been granted. If a
certain action is constrained, then it should be added to the list as an
array reference with two items, the first being the name of the action,
the second being the name of the constraint.
Example return structure:
( 'create_posts', ['edit_posts', 'only_his'], 'comment_on_posts' )
NOTE: In previous versions, this method was required to return an array
of action objects, not a list of action names. This has been changed in
version 0.3.
is_super()
lib/Abilities.pm view on Meta::CPAN
=cut
requires 'roles';
=head2 actions()
Returns a list of all action names that a user object has been explicitely granted,
or that a role object has been granted. If a certain action is constrained, then
it should be added to the list as an array reference with two items, the first being
the name of the action, the second being the name of the constraint.
Example return structure:
( 'create_posts', ['edit_posts', 'only_his'], 'comment_on_posts' )
NOTE: In previous versions, this method was required to return
an array of action objects, not a list of action names. This has been changed
in version 0.3.
=cut
lib/Abilities/Features.pm view on Meta::CPAN
=cut
requires 'plans';
=head2 features()
This method returns a list of all feature names that a customer has explicitely
been given, or that a plan has. If a certain feature is constrained, then
it should be added to the list as an array reference with two items, the first being
the name of the feature, the second being the name of the constraint.
Example return structure:
( 'ssh_access', [ 'multiple_users', 5 ] )
NOTE: In previous versions, this method was required to return
an array of feature objects, not a list of feature names. This has been changed
in version 0.3.
=cut
( run in 0.842 second using v1.01-cache-2.11-cpan-39bf76dae61 )