Beispiel #1
0
def customer_match(user, groups):
    if role(user) == "admin":
        return None
    else:
        match = db.get_customer_by_match([user] + groups)
        if match:
            return match
        else:
            raise NoCustomerMatch
Beispiel #2
0
def customer_match(user, groups):
    if role(user) == 'admin':
        return None
    else:
        match = db.get_customer_by_match([user] + groups)
        if match:
            return match
        else:
            raise NoCustomerMatch
Beispiel #3
0
def customer_match(user, groups):
    if 'admin' in scopes(user, groups):
        return None
    else:
        match = db.get_customer_by_match([user] + groups)
        if match:
            if match == '*':
                return None
            return match
        else:
            raise NoCustomerMatch