Exemple #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
Exemple #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
Exemple #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