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 ...@@ -153,22 +153,24 @@ class ACL
// gather user / group data from config.xml // gather user / group data from config.xml
$config = Config::getInstance()->object() ; $config = Config::getInstance()->object() ;
foreach ($config->system->children() as $key => $node) { if ($config->system != null) {
if ($key == 'user') { foreach ($config->system->children() as $key => $node) {
$this->legacyUsers[$node->name->__toString()] = array() ; if ($key == 'user') {
$this->legacyUsers[$node->name->__toString()]['uid'] = $node->uid->__toString(); $this->legacyUsers[$node->name->__toString()] = array() ;
$this->legacyUsers[$node->name->__toString()]['groups'] = array(); $this->legacyUsers[$node->name->__toString()]['uid'] = $node->uid->__toString();
$this->legacyUsers[$node->name->__toString()]['priv'] = array(); $this->legacyUsers[$node->name->__toString()]['groups'] = array();
foreach ($node->priv as $priv) { $this->legacyUsers[$node->name->__toString()]['priv'] = array();
if (substr($priv, 0, 5) == 'page-') { foreach ($node->priv as $priv) {
if (array_key_exists($priv->__toString(), $pageMap)) { if (substr($priv, 0, 5) == 'page-') {
$this->legacyUsers[$node->name->__toString()]['priv'][] = if (array_key_exists($priv->__toString(), $pageMap)) {
$pageMap[$priv->__toString()]; $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