Merge branch 'master' of ssh://bitbucket.org/yackob03/quay into webhooks

Conflicts:
	endpoints/api.py
	test/data/test.db
This commit is contained in:
yackob03 2013-11-15 16:48:55 -05:00
commit 7ae78e5370
18 changed files with 487 additions and 185 deletions

View file

@ -301,6 +301,12 @@ def get_user(username):
return None
def get_user_or_org_by_customer_id(customer_id):
try:
return User.get(User.stripe_id == customer_id)
except User.DoesNotExist:
return None
def get_matching_teams(team_prefix, organization):
query = Team.select().where(Team.name ** (team_prefix + '%'),
Team.organization == organization)
@ -496,6 +502,11 @@ def change_password(user, new_password):
user.save()
def change_invoice_email(user, invoice_email):
user.invoice_email = invoice_email
user.save()
def update_email(user, new_email):
user.email = new_email
user.verified = False