Description:
add authorization for show max score
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r595:ad86e593f5b0 - - 1 file changed: 1 inserted, 1 deleted
@@ -1,27 +1,27 | |||||
|
1 | class ReportController < ApplicationController |
|
1 | class ReportController < ApplicationController |
|
2 |
|
2 | ||
|
3 | - before_filter :admin_authorization, only: [:login_stat,:submission_stat, :stuck, :cheat_report, :cheat_scruntinize] |
|
3 | + before_filter :admin_authorization, only: [:login_stat,:submission_stat, :stuck, :cheat_report, :cheat_scruntinize, :show_max_score] |
|
4 |
|
4 | ||
|
5 | before_filter(only: [:problem_hof]) { |c| |
|
5 | before_filter(only: [:problem_hof]) { |c| |
|
6 | return false unless authenticate |
|
6 | return false unless authenticate |
|
7 |
|
7 | ||
|
8 | if GraderConfiguration["right.user_view_submission"] |
|
8 | if GraderConfiguration["right.user_view_submission"] |
|
9 | return true; |
|
9 | return true; |
|
10 | end |
|
10 | end |
|
11 |
|
11 | ||
|
12 | admin_authorization |
|
12 | admin_authorization |
|
13 | } |
|
13 | } |
|
14 |
|
14 | ||
|
15 | def max_score |
|
15 | def max_score |
|
16 | end |
|
16 | end |
|
17 |
|
17 | ||
|
18 | def show_max_score |
|
18 | def show_max_score |
|
19 | #process parameters |
|
19 | #process parameters |
|
20 | #problems |
|
20 | #problems |
|
21 | @problems = [] |
|
21 | @problems = [] |
|
22 | params[:problem_id].each do |id| |
|
22 | params[:problem_id].each do |id| |
|
23 | next unless id.strip != "" |
|
23 | next unless id.strip != "" |
|
24 | @problems << Problem.find(id.to_i) |
|
24 | @problems << Problem.find(id.to_i) |
|
25 | end |
|
25 | end |
|
26 |
|
26 | ||
|
27 | #users |
|
27 | #users |
You need to be logged in to leave comments.
Login now