

def __before__(self):
    ' Perform actions before action method is invoked.\n            Deals with authentication.\n        '
    c.www_version = nipapwww.__version__
    o = AuthOptions({
        'username': session.get('user'),
        'full_name': session.get('full_name'),
        'authoritative_source': 'nipap',
        'readonly': session.get('readonly'),
    })
    if (self.requires_auth and ('user' not in session)):
        session['path_before_login'] = request.path_info
        session.save()
        redirect(url(controller='auth', action='login'))

dataset/ETHPy150Open SpriteLink/NIPAP/nipap-www/nipapwww/lib/base.py BaseController.__before__/original