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: {
let a = action as appCommonActions.InitUserSuccess;
let claims = {}
Object.getOwnPropertyNames(a.userinfo.info).forEach((k) => {
claims[k] = a.userinfo[k];
});
let claims = { ...a.userinfo.info };
var user:IUser = {
code:a.user.code,
email:claims["email"]!== undefined ? claims["email"] : a.user.name,