Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Odevzdávací Systém MO
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MO-P
Odevzdávací Systém MO
Commits
768be576
Project 'mj/mo-submit' was moved to 'mo-p/osmo'. Please update any links and bookmarks that may still have the old path.
Commit
768be576
authored
Feb 9, 2021
by
Martin Mareš
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
mo/rights.py
+3
-2
3 additions, 2 deletions
mo/rights.py
with
3 additions
and
2 deletions
mo/rights.py
+
3
−
2
View file @
768be576
...
@@ -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
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment