N°1027 Internal

SVN:trunk[4899]
This commit is contained in:
Guillaume Lajarige
2017-09-07 16:01:02 +00:00
parent affd8ea8a6
commit 6f474686ad

View File

@@ -137,6 +137,21 @@ $oApp->before(function(Symfony\Component\HttpFoundation\Request $oRequest, Silex
$oKPI->ComputeAndReport('Parsing portal configuration');
// Loading current user
ApplicationHelper::LoadCurrentUser($oApp);
// Checking that user is allowed this portal
$bAllowed = false;
foreach($oApp['combodo.portal.instance.conf']['portals'] as $aAllowedPortal)
{
if($aAllowedPortal['id'] === PORTAL_ID)
{
$bAllowed = true;
break;
}
}
if(!$bAllowed)
{
$oApp->abort(404);
}
}, Application::EARLY_EVENT);
// Running application