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

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