~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to www/dispatch/__init__.py

  • Committer: mattgiuca
  • Date: 2008-02-21 06:06:10 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:531
www/auth: Split authenticate.py into 3 modules: autherror and ldap_auth.
    Now authenticate looks through the list of modules in conf.auth_modules
    to figure out what to import (does not import ldap_auth directly,
    only through auth_modules).
    Error messages now contain module name.
setup.py: Renamed ldap to ldap_auth (due to naming conflict with ldap lib).

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
        app = conf.apps.app_url[req.app]
75
75
 
76
76
    # Check if app requires auth. If so, perform authentication and login.
 
77
    # This will either return a User object, None, or perform a redirect
 
78
    # which we will not catch here.
77
79
    if app.requireauth:
78
 
        req.username = login.login(req)
79
 
        logged_in = req.username is not None
 
80
        req.user = login.login(req)
 
81
        logged_in = req.user is not None
80
82
    else:
81
 
        req.username = login.get_username(req)
 
83
        req.user = login.get_user_details(req)
82
84
        logged_in = True
83
85
 
84
86
    if logged_in: