Skip to content
Snippets Groups Projects
Commit 768be576 authored by Martin Mareš's avatar Martin Mareš
Browse files

Garant soutěže může editovat body ve všech stavech

parent 0746a4bd
No related branches found
No related tags found
No related merge requests found
...@@ -19,7 +19,7 @@ class Right(Enum): ...@@ -19,7 +19,7 @@ class Right(Enum):
upload_feedback = auto() # Nahrávat opravené řešení ve stavu "grading" upload_feedback = auto() # Nahrávat opravené řešení ve stavu "grading"
view_submits = auto() # Prohlížet si řešení a opravy view_submits = auto() # Prohlížet si řešení a opravy
upload_submits = auto() # Nahrávat řešení a opravy nezávisle na stavu soutěže upload_submits = auto() # Nahrávat řešení a opravy nezávisle na stavu soutěže
edit_points = auto() edit_points = auto() # Přidělovat body ve stavu "grading"
view_statement = auto() # Prohlížet zadání, pokud je dostupné pro dozor view_statement = auto() # Prohlížet zadání, pokud je dostupné pro dozor
add_users = auto() add_users = auto()
edit_users = auto() edit_users = auto()
...@@ -192,7 +192,8 @@ class Rights: ...@@ -192,7 +192,8 @@ class Rights:
or self.have_right(Right.upload_feedback) and round.state == db.RoundState.grading) or self.have_right(Right.upload_feedback) and round.state == db.RoundState.grading)
def can_edit_points(self, round: db.Round) -> bool: def can_edit_points(self, round: db.Round) -> bool:
return self.have_right(Right.edit_points) and round.state == db.RoundState.grading return (self.have_right(Right.edit_points) and round.state == db.RoundState.grading
or self.have_right(Right.manage_contest))
def can_view_statement(self, round: db.Round) -> bool: def can_view_statement(self, round: db.Round) -> bool:
if round.tasks_file is None: if round.tasks_file is None:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment