Mercurial > p > roundup > code
comparison roundup/cgi/client.py @ 2938:463902a0fbbb
determine user before context:
SendFile exception handler requires initialized userid attribute.
| author | Alexander Smishlajev <a1s@users.sourceforge.net> |
|---|---|
| date | Sun, 21 Nov 2004 13:27:03 +0000 |
| parents | 46fdfcf42806 |
| children | 00f609d53a8c |
comparison
equal
deleted
inserted
replaced
| 2937:46fdfcf42806 | 2938:463902a0fbbb |
|---|---|
| 1 # $Id: client.py,v 1.203 2004-11-20 17:46:24 a1s Exp $ | 1 # $Id: client.py,v 1.204 2004-11-21 13:27:03 a1s Exp $ |
| 2 | 2 |
| 3 """WWW request handler (also used in the stand-alone server). | 3 """WWW request handler (also used in the stand-alone server). |
| 4 """ | 4 """ |
| 5 __docformat__ = 'restructuredtext' | 5 __docformat__ = 'restructuredtext' |
| 6 | 6 |
| 213 self.ok_message = [] | 213 self.ok_message = [] |
| 214 self.error_message = [] | 214 self.error_message = [] |
| 215 try: | 215 try: |
| 216 self.determine_charset() | 216 self.determine_charset() |
| 217 | 217 |
| 218 # make sure we're identified (even anonymously) | |
| 219 self.determine_user() | |
| 220 | |
| 218 # figure out the context and desired content template | 221 # figure out the context and desired content template |
| 219 # do this first so we don't authenticate for static files | 222 # do this first so we don't authenticate for static files |
| 220 # Note: this method opens the database as "admin" in order to | 223 # Note: this method opens the database as "admin" in order to |
| 221 # perform context checks | 224 # perform context checks |
| 222 self.determine_context() | 225 self.determine_context() |
| 223 | |
| 224 # make sure we're identified (even anonymously) | |
| 225 self.determine_user() | |
| 226 | 226 |
| 227 # possibly handle a form submit action (may change self.classname | 227 # possibly handle a form submit action (may change self.classname |
| 228 # and self.template, and may also append error/ok_messages) | 228 # and self.template, and may also append error/ok_messages) |
| 229 html = self.handle_action() | 229 html = self.handle_action() |
| 230 | 230 |
