Description:
fixed login box showing in announcement box after user logged out in other tabs
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r249:11f906d2e75a - - 1 file changed: 10 inserted, 0 deleted
@@ -5,6 +5,10 | |||
|
5 | 5 | |
|
6 | 6 | append_before_filter :update_user_start_time, :except => [:index, :login] |
|
7 | 7 | |
|
8 | + # to prevent log in box to be shown when user logged out of the | |
|
9 | + # system only in some tab | |
|
10 | + prepend_before_filter :reject_announcement_refresh_when_logged_out, :only => [:announcements] | |
|
11 | + | |
|
8 | 12 | # COMMENTED OUT: filter in each action instead |
|
9 | 13 | # before_filter :verify_time_limit, :only => [:submit] |
|
10 | 14 | |
@@ -326,5 +330,11 | |||
|
326 | 330 | UserContestStat.update_user_start_time(user) |
|
327 | 331 | end |
|
328 | 332 | |
|
333 | + def reject_announcement_refresh_when_logged_out | |
|
334 | + if not session[:user_id] | |
|
335 | + render :text => 'Access forbidden', :status => 403 | |
|
336 | + end | |
|
329 | 337 | end |
|
330 | 338 | |
|
339 | + end | |
|
340 | + |
You need to be logged in to leave comments.
Login now