Exemple #1
0
def before_request():
    g.permission = User.auth()
    if g.permission >= 2:
        g.this_user = User(session['id'], session['id'])
        g.sm_av_path = User.get_avatar_mini_path(session['id'])
        g.av_path = User.get_avatar_path(session['id'])
        g.connection_ids, g.requested_connection_ids, g.unconfirmed_connection_ids = \
            User.get_all_connection_ids(session['id'])
        g.all_connection_ids = list(
            set(g.connection_ids + g.requested_connection_ids +
                g.unconfirmed_connection_ids))
Exemple #2
0
def before_request():
    g.permission = User.auth()
    if g.permission >= 2:
        g.this_user = User(session['id'], session['id'])
Exemple #3
0
def before_request():
    g.permission = User.auth()