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