def check_rank(rank):
    def real_decorator(function_to_decorate):
        @wraps(function_to_decorate)
        def decorated_function(*args, **kwargs):
            if g.my is None:
                abort(401)
            status = g.my.get('status', None)
            if status is None or status == NOTACTIVATED:
                abort(401)
            if g.my.get('rank', 80) > rank:
                abort(401)
            return function_to_decorate(*args, **kwargs)
        return decorated_function
    return real_decorator
Check the user rank, if the user has not the 
dataset/ETHPy150Open Opentaste/bombolone/bombolone/decorators.py/check_rank