Skip to content

Commit

Permalink
restrictions: Include restriction's section name in user restrictions
Browse files Browse the repository at this point in the history
  • Loading branch information
lippserd committed Oct 1, 2014
1 parent 64d41ac commit 74bd9b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/Icinga/Authentication/AdmissionLoader.php
Expand Up @@ -75,12 +75,12 @@ public function getRestrictions($username, array $groups)
} 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;
Expand Down

0 comments on commit 74bd9b3

Please sign in to comment.