Commits

Anonymous committed 2e790b7

s/trac_admin.py/trac-admin in error.cs.

Comments (0)

Files changed (3)

     print
     print 'Trac detected an internal error:'
     print
-    print real_e
+    print e
     print

templates/error.cs

 permissions to users like this:
 
 <pre>
-  $ trac_admin.py /path/to/trac.db permission add <?cs var:trac.authname ?> <?cs var:error.action ?>
+  $ trac-admin /path/to/trac.db permission add <i>username</i> <?cs var:error.action ?>
 </pre>
-or to all unauthenticated users:
+or to any authenticated users:
 <pre>
-  $ trac_admin.py /path/to/trac.db permission add anonymous <?cs var:error.action ?>
+  $ trac-admin /path/to/trac.db permission add authenticated <?cs var:error.action ?>
+</pre>
+or to everybody:
+<pre>
+  $ trac-admin /path/to/trac.db permission add anonymous <?cs var:error.action ?>
 </pre>
 </p>
 
     import neo_cgi
     import os.path
     import db
+    from auth import get_authname
+    
     cnx = db.get_connection()
     cursor = cnx.cursor()
     cursor.execute('SELECT value FROM config WHERE section=%s '
     cgi = neo_cgi.CGI()
     cgi.hdf.setValue('hdf.loadpaths.0', templates_dir)
     cgi.hdf.setValue('htdocs_location', htdocs_location)
+    cgi.hdf.setValue('trac.authname', get_authname())
     return cgi, templates_dir
 
 def main():