evroon / bracket

Selfhosted tournament system
https://docs.bracketapp.nl
GNU Affero General Public License v3.0
239 stars 50 forks source link

Feature Request: Judge Role #927

Open zanderisrael opened 1 month ago

zanderisrael commented 1 month ago

Feature Request: Judge Role

Summary

I would like to propose adding a Judge Role feature to the application. The idea is to have a user role specifically for judges who can log in and manage only the courts they are assigned to. This role would have restricted access compared to admins and participants.

Feature Description

Judge Role:

Admin Role (for context):

Benefits:

Proposed Implementation

  1. User Authentication & Roles: Add a new user role called "Judge" with restricted access.
  2. Court Assignment: Admins can assign specific courts to each judge.
  3. Dashboard for Judges: Upon login, judges will be shown only their assigned courts with options to update scores.
  4. Score Management: Judges should be able to enter and update scores for the matches they are responsible for.

Potential Challenges

Optional Add-ons

Conclusion

This feature would streamline the role of judges in the system and enhance the management of tournaments, particularly those with multiple courts running concurrently.

zanderisrael commented 1 week ago

Hey, I can add this functionality if your busy, i'd like some pointers as to what is needed so I don't waste time. Thanks : )

evroon commented 5 days ago

Hey, sorry that I haven't responded earlier.

Thanks for raising this feature request!

I think the idea to add judges is a good idea. However, I am not sure what the best way to implement it is. For example, you suggest to bind judges to courts, but other tournament systems bind judges to individual matches (1 to many relationship). I would be inclined to bind judges to matches, and then users (admins in your case) can assign a judge to all matches at a court at once, to make the UX better.

Also this is a bit problematic:

Upon logging in, judges will only have access to the courts they are assigned to.

The authorization model of Bracket currently only determines whether a user has access to a certain club, and then the user can access all tournaments inside that club. I don't want to overcomplicate things by having to deal with authorization on a deep level, because it easily leads to bugs and it makes the interface/frontend a lot more complicated. So is there a large downside to giving judges more access?

As for the implementation, I have to think about it a bit more before I can think of the best way to implement this. I want to keep Bracket relatively simple and not add unnecessary complexity to handle specific usecases without a good understanding of the motivation behind it, so I would first want to understand the problem better.

zanderisrael commented 5 days ago

Sure, When running multiple tables (courts), its hard to keep score if only one person can enter scores. If we have a judge role we can then let the judge enter scores for his court (avoid mistakes) Maybe a dedicated table for judge type users that contains a separate route entirely with separate auth and fronted. its a workaround... In the end:

  1. assign judge to court
  2. allow judge to enter match results.

the rest of the functionality is not needed (ui)