mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-20 17:18:51 +02:00
N°1027 Internal
SVN:trunk[4899]
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user