Skip to content

Commit

Permalink
ADAuthorizer auth skip count entry
Browse files Browse the repository at this point in the history
  • Loading branch information
murrant committed Sep 14, 2023
1 parent 545a58c commit 75ec924
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion LibreNMS/Authentication/ADAuthorizationAuthorizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,11 @@ public function getRoles(string $username): array|false

// collect all roles
$auth_ad_groups = Config::get('auth_ad_groups');
foreach ($entries[0]['memberof'] as $entry) {
foreach ($entries[0]['memberof'] as $index => $entry) {
if ($index == 'count') {
continue; // skip count entry
}

$group_cn = $this->getCn($entry);

if (isset($auth_ad_groups[$group_cn]['roles']) && is_array($auth_ad_groups[$group_cn]['roles'])) {
Expand Down

0 comments on commit 75ec924

Please sign in to comment.