module Authorization
In order to use this mixin, you'll need to define roles by overriding the following functions:
User#has_role?(role)
Return true or false depending on the roles (strings) passed in.
Model#accepts_role?(role, user)
Return true or false depending on the roles (strings) this particular user has for this particular model object.
See www.writertopia.com/developers/authorization
Provides the appearance of dynamically generated methods on the roles database.
Examples:
user.is_member? --> Returns true if user has any role of "member" user.is_member_of? this_workshop --> Returns true/false. Must have authorizable object after query. user.is_eligible_for [this_award] --> Gives user the role "eligible" for "this_award" user.is_moderator --> Gives user the general role "moderator" (not tied to any class or object) user.is_candidate_of_what --> Returns array of objects for which this user is a "candidate" model.has_members --> Returns array of users which have role "member" on that model model.has_members? --> Returns true/false
Constants
- VERSION