Get username from cherrypy request object
authorQuentin Smith <quentin@mit.edu>
Sun, 9 Aug 2009 22:45:35 +0000 (18:45 -0400)
committerQuentin Smith <quentin@mit.edu>
Sun, 9 Aug 2009 22:45:35 +0000 (18:45 -0400)
svn path=/package_branches/invirt-web/cherrypy-rebased/; revision=2677

code/main.py
code/templates/skeleton.mako

index 593b9f0..47f9b01 100755 (executable)
@@ -139,8 +139,7 @@ console will suffer artifacts.
         if not isinstance(subject, list):
             subject = [subject]
 
-        return dict(user=cherrypy.request.login,
-                    simple=simple,
+        return dict(simple=simple,
                     subjects=subject,
                     mapping=help_mapping)
     help._cp_config['tools.require_login.on'] = False
index d602252..a619a67 100644 (file)
@@ -46,8 +46,8 @@ function helppopup(name){
 % endif
 
 % if not simple:
-% if user:
-<p class="loggedin">Welcome, <span class="name">${user}</span>.</p>
+% if cherrypy.request.login:
+<p class="loggedin">Welcome, <span class="name">${cherrypy.request.login}</span>.</p>
 % endif
 
 <ul class="navigation">