In this section, we describe how to change the menu option URL depending on a permission. We’ll be able to redirect a user to the micro frontend (uncouple) or Masiv Web view depending on an extra permission and the uncouple flag.
The responsible area will let you know the extra permission for showing the option and also if it’s intended for MasivWeb or a micro frontend.
This is how an actual uncouple option looks.
{
"uncouple": true,
"path": "/email/campaign-detailed-report",
"link": "<https://masivapp.com/MasivianEmail/DetailedCampaingReport>",
"active": true,
"description": "Reporte detallado",
}
You’d like to add the following to the JSON config.
{
"active": true,
"description": "Crear",
"path": "/automation/editor",
"uncouple": true,
// Add the extra permission to show the Monolith Path based on a permission
"extraPermission": {
"masivWeb": {
"path": "/Automation/Editor",
"permission": "AutoWhiteBrand",
"uncouple": false
}
}
}
{
"active": true,
"description": "Enviar",
"path": "/MasivianEmail",
"requiredRoles": [
"EmailTester",
"PromagadorEmail",
"EnviarConfirmacionEmail"
],
"uncouple": false,
// Add the extra permission to show micro front based on a permission
"extraPermission": {
"oasis": {
"path": "/email/campaign-send",
"permission": "EditorDesacopladoEmail",
"uncouple": true
}
}
}
This is how an actual uncouple option looks.
{
"uncouple": true,
"path": "/email/campaign-detailed-report",
"link": "<https://masivapp.com/MasivianEmail/DetailedCampaingReport>",
"active": true,
"description": "Reporte detallado",
}
You’d like to add the following to the JSON config.
{
"uncouple": true,
"path": "/email/campaign-detailed-report",
"requiredRoles": [
"ReporteEmail"
],
"link": "<https://frontend.masivapp.com/email/campaign-detailed-report>",
"active": true,
"description": "Reporte detallado",
// Add the extrapermission
"extraPermission": [
"ReporteriaMonolitoEmail"
],
// The flag that indicates the extra permissions is to enable MasivWeb URL
"isMasivWeb": true,
// The MasivWeb path to view
"oldPath": "/MasivianEmail/DetailedCampaingReport"
}