Is it possible to change from below
if(true){
return {
...baseData,
email: profile.email,
permissions: "admin",
};
}else{
return {
...baseData,
email: profile.email,
};
}
to something like
return {
...baseData,
email: profile.email,
permissions: <some code>,
};
?