mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Merge pull request #4566 from laf/fix-ad-auth
fix: AD auth stop alerts being generated
This commit is contained in:
@ -1343,23 +1343,3 @@ function ipmiSensorName($hardwareId, $sensorIpmi, $rewriteArray)
|
||||
return $sensorIpmi;
|
||||
}
|
||||
}
|
||||
|
||||
function get_auth_ad_user_filter($username)
|
||||
{
|
||||
global $config;
|
||||
$user_filter = "(samaccountname=$username)";
|
||||
if ($config['auth_ad_user_filter']) {
|
||||
$user_filter = "(&{$config['auth_ad_user_filter']}$user_filter)";
|
||||
}
|
||||
return $user_filter;
|
||||
}
|
||||
|
||||
function get_auth_ad_group_filter($groupname)
|
||||
{
|
||||
global $config;
|
||||
$group_filter = "(samaccountname=$groupname)";
|
||||
if ($config['auth_ad_group_filter']) {
|
||||
$group_filter = "(&{$config['auth_ad_group_filter']}$group_filter)";
|
||||
}
|
||||
return $group_filter;
|
||||
}
|
||||
|
@ -1460,3 +1460,23 @@ function starts_with($haystack, $needles, $case_insensitive = false)
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function get_auth_ad_user_filter($username)
|
||||
{
|
||||
global $config;
|
||||
$user_filter = "(samaccountname=$username)";
|
||||
if ($config['auth_ad_user_filter']) {
|
||||
$user_filter = "(&{$config['auth_ad_user_filter']}$user_filter)";
|
||||
}
|
||||
return $user_filter;
|
||||
}
|
||||
|
||||
function get_auth_ad_group_filter($groupname)
|
||||
{
|
||||
global $config;
|
||||
$group_filter = "(samaccountname=$groupname)";
|
||||
if ($config['auth_ad_group_filter']) {
|
||||
$group_filter = "(&{$config['auth_ad_group_filter']}$group_filter)";
|
||||
}
|
||||
return $group_filter;
|
||||
}
|
||||
|
Reference in New Issue
Block a user