mirror of https://github.com/rancher/ui.git
parent
fc3a748eba
commit
a2ce818ea8
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue