restrictions: Include restriction's section name in user restrictions

This commit is contained in:
Eric Lippmann 2014-10-01 14:08:21 +02:00
parent 64d41ac5a3
commit 74bd9b319d
1 changed files with 2 additions and 2 deletions

View File

@ -75,12 +75,12 @@ class AdmissionLoader
} catch (NotReadableError $e) {
return $restrictions;
}
foreach ($config as $section) {
foreach ($config as $name => $section) {
if ($this->match($section, $username, $groups)) {
if (!array_key_exists($section->name, $restrictions)) {
$restrictions[$section->name] = array();
}
$restrictions[$section->name][] = $section->restriction;
$restrictions[$section->name][$name] = $section->restriction;
}
}
return $restrictions;