Commit 249c74c6 authored by Ad Schellevis's avatar Ad Schellevis

(mvc/acl) validate before use of system tag

parent 48995d12
......@@ -153,22 +153,24 @@ class ACL
// gather user / group data from config.xml
$config = Config::getInstance()->object() ;
foreach ($config->system->children() as $key => $node) {
if ($key == 'user') {
$this->legacyUsers[$node->name->__toString()] = array() ;
$this->legacyUsers[$node->name->__toString()]['uid'] = $node->uid->__toString();
$this->legacyUsers[$node->name->__toString()]['groups'] = array();
$this->legacyUsers[$node->name->__toString()]['priv'] = array();
foreach ($node->priv as $priv) {
if (substr($priv, 0, 5) == 'page-') {
if (array_key_exists($priv->__toString(), $pageMap)) {
$this->legacyUsers[$node->name->__toString()]['priv'][] =
$pageMap[$priv->__toString()];
if ($config->system != null) {
foreach ($config->system->children() as $key => $node) {
if ($key == 'user') {
$this->legacyUsers[$node->name->__toString()] = array() ;
$this->legacyUsers[$node->name->__toString()]['uid'] = $node->uid->__toString();
$this->legacyUsers[$node->name->__toString()]['groups'] = array();
$this->legacyUsers[$node->name->__toString()]['priv'] = array();
foreach ($node->priv as $priv) {
if (substr($priv, 0, 5) == 'page-') {
if (array_key_exists($priv->__toString(), $pageMap)) {
$this->legacyUsers[$node->name->__toString()]['priv'][] =
$pageMap[$priv->__toString()];
}
}
}
} elseif ($key == 'group') {
$groupmap[$node->name->__toString()] = $node ;
}
} elseif ($key == 'group') {
$groupmap[$node->name->__toString()] = $node ;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment