diff --git a/mo/web/org_round.py b/mo/web/org_round.py index b66650966c95f99f263246704bfdd8043753c168..428e5685f428dbc56b24f2fac9b39765a7111238 100644 --- a/mo/web/org_round.py +++ b/mo/web/org_round.py @@ -301,7 +301,8 @@ def org_round_task_batch_points(round_id: int, task_id: int): @app.route('/org/contest/r/<int:id>/list', methods=('GET', 'POST')) def org_round_list(id: int): - round, rr = get_round_rr(id, Right.manage_contest, True) + round, rr = get_round_rr(id, None, True) + can_edit = rr.have_right(Right.manage_contest) format = request.args.get('format', "") filter = ParticipantsFilterForm(request.args) @@ -314,16 +315,18 @@ def org_round_list(id: int): participation_state=filter.f_participation_state, ) - action_form = ParticipantsActionForm() - if action_form.do_action(round=round, query=query): - # Action happened, redirect - return redirect(request.url) + action_form = None + if can_edit: + action_form = ParticipantsActionForm() + if action_form.do_action(round=round, query=query): + # Action happened, redirect + return redirect(request.url) if format == "": (count, query) = filter.apply_limits(query, pagesize=50) # count = db.get_count(query) - table = make_contestant_table(query, add_contest_column=True, add_checkbox=True) + table = make_contestant_table(query, add_contest_column=True, add_checkbox=can_edit) return render_template( 'org_round_list.html', round=round, diff --git a/mo/web/templates/org_round_list.html b/mo/web/templates/org_round_list.html index 417006a92f9cc1c543874a4bc3d150c5c0bce603..18105a9b7a7bf47fd53ce65077e3304fd0c68e4f 100644 --- a/mo/web/templates/org_round_list.html +++ b/mo/web/templates/org_round_list.html @@ -47,7 +47,4 @@ {% include 'parts/org_participants_table_actions.html' %} -<br> -<i>Upozornění: Můžete editovat jen účastníky soutěžící v oblastech, ke kterým máte právo.</i> - {% endblock %}