/**
* Set the module
*
* We can't rely on the parent setModule function, because config could be
* called before any authentication is required.
*
* @param string $module The module to load.
* @throws BackendException If module is not allowed
*/
public function setModule($module)
{
// does this module exist?
$modules = BackendModel::getModulesOnFilesystem();
if (!in_array($module, $modules)) {
// set correct headers
header('HTTP/1.1 403 Forbidden');
// throw exception
throw new BackendException('Module not allowed.');
}
// set property
$this->module = $module;
}