# HG changeset patch # User Jittat Fakcharoenphol # Date 2010-04-14 01:19:05 # Node ID bdf9a550f783ca9b47c20c8e0964b7294823baa9 # Parent 5e2d8fe98a1a8f3c173b60be1ca15cf24fcc62da shows warning message when user cannot log in in single user mode diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -33,6 +33,7 @@ if Configuration[SINGLE_USER_MODE_CONF_KEY] user = User.find(session[:user_id]) if user==nil or (not user.admin?) + flash[:notice] = 'You cannot log in at this time' redirect_to :controller => 'main', :action => 'login' return false end