comparison MoinMoin/app.py @ 1992:d06e56e20b91

use more constants: ANON for anonymous
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Tue, 12 Feb 2013 20:11:39 +0100
parents bb2f526d961c
children 791bdedb0c20
comparison
equal deleted inserted replaced
1991:38e79cd2b320 1992:d06e56e20b91
26 from jinja2 import ChoiceLoader, FileSystemLoader 26 from jinja2 import ChoiceLoader, FileSystemLoader
27 27
28 from MoinMoin import log 28 from MoinMoin import log
29 logging = log.getLogger(__name__) 29 logging = log.getLogger(__name__)
30 30
31 from MoinMoin.constants.misc import ANON
31 from MoinMoin.i18n import i18n_init 32 from MoinMoin.i18n import i18n_init
32 from MoinMoin.i18n import _, L_, N_ 33 from MoinMoin.i18n import _, L_, N_
33 34
34 from MoinMoin.themes import setup_jinja_env, themed_error 35 from MoinMoin.themes import setup_jinja_env, themed_error
35 36
221 else: 222 else:
222 userobj = auth.handle_request(userobj) 223 userobj = auth.handle_request(userobj)
223 224
224 # if we still have no user obj, create a dummy: 225 # if we still have no user obj, create a dummy:
225 if not userobj: 226 if not userobj:
226 userobj = user.User(name=u'anonymous', auth_method='invalid') 227 userobj = user.User(name=ANON, auth_method='invalid')
227 # if we have a valid user we store it in the session 228 # if we have a valid user we store it in the session
228 if userobj.valid: 229 if userobj.valid:
229 session['user.itemid'] = userobj.itemid 230 session['user.itemid'] = userobj.itemid
230 session['user.trusted'] = userobj.trusted 231 session['user.trusted'] = userobj.trusted
231 session['user.auth_method'] = userobj.auth_method 232 session['user.auth_method'] = userobj.auth_method