First checkin

This commit is contained in:
Matt Barringer 2013-01-07 09:04:09 +01:00
parent f207e2c8b7
commit 90b30db9e8
260 changed files with 37349 additions and 0 deletions

View file

@ -0,0 +1,17 @@
class AdminAbility
include CanCan::Ability
def initialize(user)
@user = user || User.new # for guest
@user.get_roles.each { |role| send(role.name.downcase) }
end
def organizer
can :manage, Event
end
def admin
organizer
can :manage, :all
end
end