- Adds appropriate google user icon post authentication
This commit is contained in:
Eric Tokatlian 2019-07-10 15:37:19 -07:00
parent fc3a748eba
commit a2ce818ea8
1 changed files with 6 additions and 2 deletions

View File

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