aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElrond <elrond+mediagoblin.org@samba-tng.org>2013-03-29 14:48:08 +0100
committerElrond <elrond+mediagoblin.org@samba-tng.org>2013-05-09 00:21:03 +0200
commit665946033e1c9eef775a84a538ceebe9f52c657e (patch)
tree5056ed2185defe2013db5298061862da90d9fa40
parent7fb419ddd2bd1770d62fffadc674c53b670cba81 (diff)
downloadmediagoblin-665946033e1c9eef775a84a538ceebe9f52c657e.tar.lz
mediagoblin-665946033e1c9eef775a84a538ceebe9f52c657e.tar.xz
mediagoblin-665946033e1c9eef775a84a538ceebe9f52c657e.zip
piwigo: Let getStatus return the current user.
If there is a user logged in, show his name.
-rw-r--r--mediagoblin/plugins/piwigo/views.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/mediagoblin/plugins/piwigo/views.py b/mediagoblin/plugins/piwigo/views.py
index 6a246f18..5d7d371d 100644
--- a/mediagoblin/plugins/piwigo/views.py
+++ b/mediagoblin/plugins/piwigo/views.py
@@ -61,7 +61,11 @@ def pwg_getversion(request):
@CmdTable("pwg.session.getStatus")
def pwg_session_getStatus(request):
- return {'username': "fake_user"}
+ if request.user:
+ username = request.user.username
+ else:
+ username = "guest"
+ return {'username': username}
@CmdTable("pwg.categories.getList")