Description:
fixed admin authorization bug in single user mode
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r284:e64cd998f824 - - 1 file changed: 1 inserted, 1 deleted
@@ -30,13 +30,13 | |||
|
30 | 30 | end |
|
31 | 31 | |
|
32 | 32 | #Configuration.reload |
|
33 | 33 | # check if run in single user mode |
|
34 | 34 | if (Configuration[SINGLE_USER_MODE_CONF_KEY]) |
|
35 | 35 | user = User.find(session[:user_id]) |
|
36 |
- if user==nil or user. |
|
|
36 | + if user==nil or (not user.admin?) | |
|
37 | 37 | redirect_to :controller => 'main', :action => 'login' |
|
38 | 38 | return false |
|
39 | 39 | end |
|
40 | 40 | end |
|
41 | 41 | |
|
42 | 42 | return true |
You need to be logged in to leave comments.
Login now