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

« back to all changes in this revision

Viewing changes to ivle/webapp/security/views.py

  • Committer: David Coles
  • Date: 2009-07-21 02:19:56 UTC
  • mto: (1281.1.8 aufsless)
  • mto: This revision was merged to the branch mainline in revision 1300.
  • Revision ID: coles.david@gmail.com-20090721021956-c1jiwu7fhi2dna1g
Updated to work on bind mounts

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
        fields = req.get_fieldstorage()
44
44
        nexturl = fields.getfirst('url')
45
45
 
46
 
        # XXX Warning that Internet Explorer is unsupported
47
 
        # Test if the user is in Internet Explorer
48
 
        try:
49
 
            useragent = req.headers_in['User-Agent']
50
 
            # A bit of very basic UA string detection
51
 
            ctx['msie'] = ('MSIE' in useragent
52
 
                           and 'AppleWebKit' not in useragent
53
 
                           and 'Gecko' not in useragent
54
 
                           and 'Opera' not in useragent)
55
 
        except KeyError:
56
 
            ctx['msie'] = False
57
 
 
58
46
        if nexturl is None:
59
47
            nexturl = '/'
60
48
 
113
101
                else:
114
102
                    user = None
115
103
                    try:
116
 
                        # Username is case insensitive
117
104
                        user = authenticate.authenticate(req.config, req.store,
118
 
                                    username.value.lower(), password.value)
 
105
                                    username.value, password.value)
119
106
                    except AuthError, msg:
120
107
                        badlogin = msg
121
108
                    if user is None: