Exemple #1
0
def contest_submissions_view(contest_id, team_id=None):
    # Use DOMjudge team id so the pages also support non via_user teams

    if team_id and not ModuleAPI.can_write('domjudge'):
        return abort(403)

    session = DOMjudgeAPI.login(DOMJUDGE_ADMIN_USERNAME,
                                DOMJUDGE_ADMIN_PASSWORD)

    if not team_id:
        team_id = DOMjudgeAPI.get_teamid_for_userid(
            current_user.id, 3, session)

    return render_contest_submissions_view(contest_id, team_id=team_id)
Exemple #2
0
def contest_submissions_view(contest_id, team_id=None):
    # Use DOMjudge team id so the pages also support non via_user teams

    if team_id and not role_service.user_has_role(current_user,
                                                  Roles.DOMJUDGE_ADMIN):
        return abort(403)

    session = DOMjudgeAPI.login(app.config['DOMJUDGE_ADMIN_USERNAME'],
                                app.config['DOMJUDGE_ADMIN_PASSWORD'])

    if not team_id:
        team_id = DOMjudgeAPI.get_teamid_for_userid(
            current_user.id, 3, session)

    return render_contest_submissions_view(contest_id, team_id=team_id)