diff --git a/app/models/principal.js b/app/models/principal.js index 2b59682fa..c4b0ae1e8 100644 --- a/app/models/principal.js +++ b/app/models/principal.js @@ -17,8 +17,8 @@ var Principal = Resource.extend({ .get('firstObject'); }), - avatarSrc: computed('isGithub', 'id', 'profilePicture', function() { - if ( get(this, 'isGithub') && get(this, 'profilePicture') ) { + avatarSrc: computed('isGithub', 'isGoogleOauth', 'id', 'profilePicture', function() { + if ( (get(this, 'isGithub') && get(this, 'profilePicture')) || (get(this, 'isGoogleOauth') && get(this, 'profilePicture')) ) { return get(this, 'profilePicture'); } else { let id = get(this, 'id') || 'Unknown'; @@ -34,6 +34,10 @@ var Principal = Resource.extend({ return (get(this, 'provider') || '').toLowerCase() === 'github'; }), + isGoogleOauth: computed('parsedExternalType', function() { + return (get(this, 'provider') || '').toLowerCase() === 'googleoauth'; + }), + logicalType: computed('parsedExternalType', function() { switch ( get(this, 'parsedExternalType') ) { case C.PROJECT.TYPE_ACTIVE_DIRECTORY_USER: