Skip to content

Instantly share code, notes, and snippets.

@hoguej
Forked from isaacsanders/User.rb
Created October 2, 2011 03:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save hoguej/1256996 to your computer and use it in GitHub Desktop.
Save hoguej/1256996 to your computer and use it in GitHub Desktop.
For Jon Hogue
class User
include ReUser
roles do
role :god, :actions => [ :manage_all, :new_user_session, :destroy_user_session ]
role :registrant, :read_event
role :observer, :read_event
role :admin, :manage_event
mail_actions = [ :show_user, :read_todo, :box_mail, :show_mail ]
role :teacher, mail_actions
role :student, mail_actions
end
def initialize(role)
@role = role
end
# More User stuff
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment