Browse Source

new methode to get current user

sferot 10 years ago
parent
commit
73af670a65
1 changed files with 3 additions and 0 deletions
  1. 3 0
      pboard/pboard/lib/base.py

+ 3 - 0
pboard/pboard/lib/base.py View File

@@ -32,3 +32,6 @@ class BaseController(TGController):
32 32
     def back_with_error(self, message):
33 33
         flash(message)
34 34
         redirect(request.headers['Referer'])
35
+
36
+def current_user():
37
+    return request.environ.get('repoze.who.identity')['user']