thirteen-tien-len/app/policies/seat_policy.rb

49 lines
532 B
Ruby

class SeatPolicy
attr_reader :current_user, :model
def initialize(current_user, model)
@current_user = current_user || User.new
@seat = model
end
def index?
@current_user.admin?
end
def show?
@current_user.admin?
end
def update?
@current_user.admin?
end
def destroy?
@current_user.admin?
end
def play_now?
true
end
def stand?
true
end
def sit?
true
end
def add_bot?
true
end
def remove_player?
true
end
def empty?
true
end
end