Ejemplo n.º 1
0
    def before_request(self, *args, **kwargs):
        ''' this runs before every single request '''

        # check login/access status and update global session
        check_access()
        updateGlobalSession()

        self.base['error'] = None
        self._versions = update_allowed()
        self._endpoint = request.endpoint
        self._drpver, self._dapver, self._release = parseSession()

        # try to get a local version of the urlmap for the arg_validator
        if not av.urlmap:
            urlmap = build_routemap(current_app)
            marvin.config.urlmap = urlmap
            av.urlmap = urlmap
Ejemplo n.º 2
0
    def before_request(self, *args, **kwargs):
        ''' this runs before every single request '''

        # check Flask request for release info but only when no session
        if 'release' not in current_session:
            check_request_for_release(request)

        # check login/access status and update global session
        check_access()
        updateGlobalSession()

        self.base['error'] = None
        self._logged_in = current_session.get('loginready', False)
        self._versions = update_allowed()
        self._endpoint = request.endpoint
        self._drpver, self._dapver, self._release = parseSession()

        # try to get a local version of the urlmap for the arg_validator
        if not av.urlmap:
            urlmap = build_routemap(current_app)
            marvin.config.urlmap = urlmap
            av.urlmap = urlmap
Ejemplo n.º 3
0
 def global_update():
     ''' updates the global session / config '''
     updateGlobalSession()