Browse Source

new methode to get current user

sferot 11 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
     def back_with_error(self, message):
32
     def back_with_error(self, message):
33
         flash(message)
33
         flash(message)
34
         redirect(request.headers['Referer'])
34
         redirect(request.headers['Referer'])
35
+
36
+def current_user():
37
+    return request.environ.get('repoze.who.identity')['user']