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
Martin Mareš
Odevzdávací Systém MO
Merge requests
!86
Registrace
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Registrace
mj/registrace
into
devel
Overview
49
Commits
38
Changes
2
Merged
Martin Mareš
requested to merge
mj/registrace
into
devel
4 years ago
Overview
13
Commits
38
Changes
2
Implementace registrace podle
#220 (closed)
.
Edited
3 years ago
by
Martin Mareš
0
0
Merge request reports
Viewing commit
3a745f96
Prev
Next
Show latest version
2 files
+
7
−
4
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
3a745f96
Práva: Vyhodnocování rolí přesunuto do třídy UserRole
· 3a745f96
Martin Mareš
authored
3 years ago
mo/db.py
+
6
−
0
View file @ 3a745f96
Edit in single-file editor
Open in Web IDE
Show full file
@@ -528,6 +528,12 @@ class UserRole(Base):
return
"
"
.
join
(
parts
)
def
applies_to
(
self
,
at
:
Optional
[
Place
]
=
None
,
year
:
Optional
[
int
]
=
None
,
cat
:
Optional
[
str
]
=
None
,
seq
:
Optional
[
int
]
=
None
)
->
bool
:
return
((
at
is
None
or
self
.
place_id
==
at
.
place_id
)
and
(
self
.
year
is
None
or
year
is
None
or
self
.
year
==
year
)
and
(
self
.
category
is
None
or
cat
is
None
or
self
.
category
==
cat
or
(
self
.
category
==
'
Z
'
and
cat
.
startswith
(
'
Z
'
)))
and
(
self
.
seq
is
None
or
seq
is
None
or
self
.
seq
==
seq
))
class
PaperType
(
MOEnum
):
solution
=
auto
()
Loading