sessions_helper.rb 157 Bytes
Newer Older
Sara Kuqi's avatar
fc  
Sara Kuqi committed
1
module SessionsHelper
pei-chi.huang's avatar
pei-chi.huang committed
2
3
  def operator?
    current_user && current_user.type == "Operator"
Sara Kuqi's avatar
fc  
Sara Kuqi committed
4
5
6
7
8
  end
  def current_user?(user)
    user == current_user
  end

pei-chi.huang's avatar
pei-chi.huang committed
9
end