1
0
Fork 0
forked from OpenNeo/impress
impress/app/controllers/application_controller.rb
2011-07-14 13:56:20 -04:00

14 lines
336 B
Ruby

class ApplicationController < ActionController::Base
protect_from_forgery
helper_method :can_use_image_mode?
def authenticate_user! # too lazy to change references to login_path
redirect_to(login_path) unless user_signed_in?
end
def can_use_image_mode?
user_signed_in? && current_user.image_mode_tester?
end
end