Created
October 2, 2011 03:21
-
-
Save isaacsanders/1256983 to your computer and use it in GitHub Desktop.
For Jon Hogue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User | |
include ReUser | |
roles do | |
role :god do |r| | |
r.action :manage_all | |
r.aciton :new_user_session | |
r.action :create_user_session | |
r.action :destroy_user_session | |
end | |
role :registrant {|r| r.action :read_event} | |
role :observer {|r| action :read_event} | |
role :admin {|r| action :manage_event} | |
mail_actions = lambda do |r| | |
r.action :show_user | |
r.action :read_todo | |
r.action :box_mail | |
r.action :show_mail | |
end | |
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