Underpinnings of the ability to connect a GitHub account to an existing Quay account.

This commit is contained in:
yackob03 2014-01-14 15:23:44 -05:00
parent c72cae954b
commit f311885e2a
8 changed files with 82 additions and 7 deletions

View file

@ -151,6 +151,14 @@ def user_view(user):
organizations = model.get_user_organizations(user.username)
def login_view(login):
return {
'service': login.service.name,
'service_identifier': login.service_ident,
}
logins = model.list_federated_logins(user)
return {
'verified': user.verified,
'anonymous': False,
@ -159,6 +167,7 @@ def user_view(user):
'gravatar': compute_hash(user.email),
'askForPassword': user.password_hash is None,
'organizations': [org_view(o) for o in organizations],
'logins': [login_view(login) for login in logins],
'can_create_repo': True,
'invoice_email': user.invoice_email
}