module Troles::Common
@author Kristian Mandrup
Schema configuration Has responsibiloity to configure relationships between models
@author Kristian Mandrup
Valid roles module Adds methods for operating on/with valid roles
@author Kristian Mandrup
Handles event handlinm/publication for when the roles of a role subject change This is currently a singleton (class methods only) by design
@author Kristian Mandrup
Macros
that can be used directly on the role subject class These methods are added to the ruby core 'Module' module
Usage:
class User troles_strategy :bit_many
@author Kristian Mandrup
Marshallers can be used by Storages to handle conversion from between a role list of symbols and the data format stored in the datastore One example is the Bitmask marshaller, which converts between an Integer and a role list One could imagine other custom marshallers, such as using encrypted strings etc.
require 'troles/common/marshaller/generic'
@author Kristian Mandrup
The Operations
API object
Usage example:
- user.roles + :admin - user.roles.clear!
@author Kristian Mandrup
@author Kristian Mandrup
The Common
Storage
API @note all methods potentially operate directly on values in the data store