Add provider info
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good

This commit is contained in:
Willem Dantuma
2024-02-08 18:33:35 +01:00
parent 3bacb8a5d9
commit 3e482470b6
2 changed files with 11 additions and 5 deletions

View File

@@ -20,11 +20,14 @@ export class UserMenuComponent implements OnInit {
ngOnInit(): void {
}
getLetter():string {
if (this.user && this.user.firstName && this.user.lastName)
return this.user.firstName.substr(0,1).toUpperCase() +
this.user.lastName.substr(0,1).toUpperCase();
return this.user && this.user.name ? this.user.name.substr(0,1).toUpperCase():"";
getProvider():string | null {
const ownedClaims = this.oauthService.getIdentityClaims();
if(ownedClaims) {
if (ownedClaims["idp"] != "local") {
return ownedClaims["idp"];
}
}
return null;
}
logout(event:MouseEvent) {