DOMjudge / domjudge

DOMjudge programming contest jury system
https://www.domjudge.org
GNU General Public License v2.0
703 stars 249 forks source link

Specific Role for Jury to upload the problems #2423

Open vmcj opened 3 months ago

vmcj commented 3 months ago

We had this discussion in the past and should revisit the idea to let jury users get the optional role to also upload the problems.

eldering commented 3 months ago

What's changed since last time? I think that if the contest admins decide that jury members should be able to upload problems, then they should be given the admin role. I don't see the point of adding a separate extra role for this: it will only add clutter and complexity.

nickygerritsen commented 3 months ago

It seems for some contests the jury is trusted enough to be able to upload the problems, but not enough to not by accident change teams, contest settings, etc.

eldering commented 3 months ago

It seems for some contests the jury is trusted enough to be able to upload the problems, but not enough to not by accident change teams, contest settings, etc.

But should we really cater to that? What if there's a contest where a jury is trusted enough to upload problems, and change team names, but nothing else? Do we create yet another role for that?

I think that in this scenario you can easily upload the problems beforehand yourself (possibly with a jury member validating it) or if you trust jury members enough to last-minute change problems (which can break things), then I don't see why you'd not trust them to not accidentally make changes elsewhere.

vmcj commented 3 months ago

It seems for some contests the jury is trusted enough to be able to upload the problems, but not enough to not by accident change teams, contest settings, etc.

But should we really cater to that? What if there's a contest where a jury is trusted enough to upload problems, and change team names, but nothing else? Do we create yet another role for that?

I think that in this scenario you can easily upload the problems beforehand yourself (possibly with a jury member validating it) or if you trust jury members enough to last-minute change problems (which can break things), then I don't see why you'd not trust them to not accidentally make changes elsewhere.

I think it is not that hard for us to create the role, it will even annotate the code a bit more on what you need and if people want to extend on DOMjudge in forks, we can still decide to only expose the PROBLEM_UPLOADER privilige to admin users and have people change this in forks, similar how we have a cds type which is bundles of a couple of priviliges.

I propose we check how hard it would be to replace this check for admin role with a new role and afterwards check if we want to add an extra account type. Implicit this will also allow for a bit of (possibly) refactoring of the order of steps what happens as we would look at the privilege.

And I agree we're having the discussion often but I think our users have asked for this often enough so that we should atleast investigate how much extra code this would be, I'm perfectly fine with doing a mockup PR for this and discuss from there.