Add "public" setting to contests
This commit is contained in:
@@ -67,7 +67,7 @@ class ContestsController < ApplicationController
|
||||
|
||||
def scoreboard
|
||||
@contest = Contest.find_by(slug: params[:id])
|
||||
unless @contest
|
||||
unless @contest && @contest.public
|
||||
skip_authorization
|
||||
not_found and return
|
||||
end
|
||||
@@ -94,6 +94,6 @@ class ContestsController < ApplicationController
|
||||
end
|
||||
|
||||
def contest_params
|
||||
params.expect(contest: [ :lang, :name, :team, :allow_registration ])
|
||||
params.expect(contest: [ :lang, :name, :public, :team, :allow_registration ])
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user