repo.or.cz
/
autotest-zwu.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fixing a missing quote meant to go on r5471
[autotest-zwu.git]
/
frontend
/
thread_local.py
blob
3719a2dfeaa5f1207f0e54e746a0e8e11d87050f
1
import
threading
2
3
_store
=
threading
.
local
()
4
_store
.
user
=
None
5
6
def
set_user
(
user
):
7
"""\
8
Sets the current request's logged-in user. user should be a
9
afe.models.User object.
10
"""
11
_store
.
user
=
user
12
13
14
def
get_user
():
15
'Get the currently logged-in user as a afe.models.User object.'
16
return
_store
.
user