Ability Helper modules

kristianmandrup edited this page Apr 15, 2012 · 2 revisions

This extension comes with the following Ability helper modules for use with cantango-permits

  • CanTango::Ability::Helper::Role
  • CanTango::Ability::Helper::RoleGroup

These modules are typically included into an Ability in order to access the roles of the ability subject, typically a user (or in rare cases an account).

The Role module has a #roles method which returns the role list of the subject. The RoleGroup module has a #role_groups method which returns the role group list of the subject