def load_user(userid): if request_for_static(): return DummyUser(userid) if request.blueprint == 'authproxy': return DummyUser(userid) return User.by_id(userid)
def load_project_user(): if request_for_static(): return g.user = current_user