AW-4641 Fix copy claims from userinfo
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good

This commit is contained in:
Peter Bastiani 2023-02-08 09:25:13 +01:00
parent 12312c0e8b
commit e9ace73ddd

View File

@ -59,10 +59,7 @@ export function reducer(state = initialState, action: appCommonActions.Actions )
} }
case appCommonActions.INITUSERSUCCESS: { case appCommonActions.INITUSERSUCCESS: {
let a = action as appCommonActions.InitUserSuccess; let a = action as appCommonActions.InitUserSuccess;
let claims = {} let claims = { ...a.userinfo.info };
Object.getOwnPropertyNames(a.userinfo.info).forEach((k) => {
claims[k] = a.userinfo[k];
});
var user:IUser = { var user:IUser = {
code:a.user.code, code:a.user.code,
email:claims["email"]!== undefined ? claims["email"] : a.user.name, email:claims["email"]!== undefined ? claims["email"] : a.user.name,