Moved static method GetAllowedPortals() from LoginWebpage class to UserRights class.

SVN:trunk[3862]
This commit is contained in:
Guillaume Lajarige
2016-01-15 10:32:17 +00:00
parent 161041d379
commit 879f5d89b9
2 changed files with 26 additions and 26 deletions

View File

@@ -846,29 +846,4 @@ EOF
}
return false; // nothing matched !!
}
public static function GetAllowedPortals()
{
$aAllowedPortals = array();
$aPortalsConf = PortalDispatcherData::GetData();
$aDispatchers = array();
foreach($aPortalsConf as $sPortalId => $aConf)
{
$sHandlerClass = $aConf['handler'];
$aDispatchers[$sPortalId] = new $sHandlerClass($sPortalId);
}
foreach($aDispatchers as $sPortalId => $oDispatcher)
{
if ($oDispatcher->IsUserAllowed())
{
$aAllowedPortals[] = array(
'id' => $sPortalId,
'label' => $oDispatcher->GetLabel(),
'url' => $oDispatcher->GetUrl(),
);
}
}
return $aAllowedPortals;
}
} // End of class