Description:
[web] temporary fixed on problem of reloading Configuration, when there are many mongrel processes git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@164 6386c4cd-e34a-4fa8-8920-d93eb39b512e
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r83:092dd4df7102 - - 1 file changed: 1 inserted, 0 deleted

@@ -21,12 +21,13
21 def authenticate
21 def authenticate
22 unless session[:user_id]
22 unless session[:user_id]
23 redirect_to :controller => 'main', :action => 'login'
23 redirect_to :controller => 'main', :action => 'login'
24 return false
24 return false
25 end
25 end
26
26
27 + Configuration.reload
27 # check if run in single user mode
28 # check if run in single user mode
28 if (Configuration[SINGLE_USER_MODE_CONF_KEY])
29 if (Configuration[SINGLE_USER_MODE_CONF_KEY])
29 user = User.find(session[:user_id])
30 user = User.find(session[:user_id])
30 if user==nil or user.login != 'root'
31 if user==nil or user.login != 'root'
31 redirect_to :controller => 'main', :action => 'login'
32 redirect_to :controller => 'main', :action => 'login'
32 return false
33 return false
You need to be logged in to leave comments. Login now