Esempio n. 1
0
    def profile(self):
        if not request.environ.get('REMOTE_USER', False):
            abort(401)
        
        c.user = h.get_user(request.environ['REMOTE_USER'])        

        return render('account/profile.html')
Esempio n. 2
0
 def signout(self):
     ''' 
     Action to sign the user out. The actual signout happens when the
     middleware captures the request, so this function just displays a
     confirmation pageFor ``cookie`` authentication this
     function's routing must be added to the ``authkit.cookie.signoutpath``
     directive.
     '''
     return render('account/signedout.html')
Esempio n. 3
0
    def signin(self):
        identity = request.environ.get('repoze.who.identity')
        if identity is not None:
            came_from = request.params.get('came_from', '')
            if request.environ.get('HTTP_REFERER', '').startswith(came_from)\
                or not came_from:
                redirect('/account/profile')
            if came_from:
                redirect(str(came_from))

        c.failed = request.url == request.environ.get('HTTP_REFERER','')

        return render('/account/signin.html')
Esempio n. 4
0
 def map(self):
     return render('map.html')
Esempio n. 5
0
 def index(self):
     return render('index.html')
Esempio n. 6
0
 def result(self):
     ''' Target of redirect from submit. Simply returns a "Registration
     Successful!" page '''
     return render('account/success.html')
Esempio n. 7
0
 def register(self):
     '''Renders the registration form.'''
     return render('account/register.html')
Esempio n. 8
0
 def map(self):
     return render('map.html')
Esempio n. 9
0
 def index(self):
     return render('index.html')