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

« back to all changes in this revision

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

  • Committer: Matt Giuca
  • Date: 2009-05-19 02:54:08 UTC
  • mfrom: (1258 trunk)
  • mto: This revision was merged to the branch mainline in revision 1322.
  • Revision ID: matt.giuca@gmail.com-20090519025408-19c7cjl7w6ot6frm
MergedĀ fromĀ trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
    # This needs to be importable from outside Apache.
26
26
    pass
27
27
 
28
 
import ivle.util
29
28
import ivle.pulldown_subj
30
29
import ivle.webapp.security
31
30
from ivle.auth import authenticate, AuthError
62
61
        else:
63
62
            query_string = '?url=' + urllib.quote(nexturl, safe="/~")
64
63
 
65
 
        ctx['path'] = ivle.util.make_path('+login') + query_string
 
64
        ctx['path'] = req.make_path('+login') + query_string
66
65
 
67
66
        # If this succeeds, the user is invalid.
68
67
        user = ivle.webapp.security.get_user_details(req)
73
72
                # if you are not planning to display a ToS page - the ToS
74
73
                # acceptance process actually calls usrmgt to create the user
75
74
                # jails and related stuff.
76
 
                req.throw_redirect(ivle.util.make_path('+tos') + query_string)
 
75
                req.throw_redirect(req.make_path('+tos') + query_string)
77
76
            elif user.state == "pending":
78
77
                # FIXME: this isn't quite the right answer, but it
79
78
                # should be more robust in the short term.
152
151
        if req.method == "POST":
153
152
            req.logout()
154
153
        else:
155
 
            ctx['path'] =  ivle.util.make_path('+logout')
 
154
            ctx['path'] =  req.make_path('+logout')