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
!1
Menu
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Menu
jirka/menu
into
master
Overview
6
Commits
3
Changes
1
1 unresolved thread
Hide all comments
Merged
Jiří Setnička
requested to merge
jirka/menu
into
master
4 years ago
Overview
6
Commits
3
Changes
1
1 unresolved thread
Hide all comments
0
0
Merge request reports
Viewing commit
85adab28
Show latest version
1 file
+
3
−
2
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
85adab28
Fix pro nepřihlášené uživatele
· 85adab28
Jiří Setnička
authored
4 years ago
mo/web/main.py
+
3
−
2
View file @ 85adab28
Edit in single-file editor
Open in Web IDE
Show full file
@@ -103,10 +103,11 @@ def reset():
@app.route
(
'
/
'
)
def
index
():
need_login
()
# FIXME: Časem asi nebude potřeba
sess
=
db
.
get_session
()
# FIXME: Preloadovat místa
roles
=
sess
.
query
(
db
.
UserRole
).
filter_by
(
user_id
=
g
.
user
.
user_id
).
all
()
roles
=
[]
if
g
.
user
:
roles
=
sess
.
query
(
db
.
UserRole
).
filter_by
(
user_id
=
g
.
user
.
user_id
).
all
()
return
render_template
(
'
main.html
'
,
roles
=
roles
,
roles_by_type
=
mo
.
rights
.
roles_by_type
)
Loading