mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
alerting: Added option to enable/disable option for sending alerts to normal users (#6590)
* alerting: Added option to enable/disable option for sending alerts to normal users * Update notifications.rss * added missing sql * Fix schema * Update notifications.rss
This commit is contained in:
@@ -269,6 +269,10 @@ $general_conf = array(
|
||||
'descr' => 'Issue alerts to read only users',
|
||||
'type' => 'checkbox',
|
||||
),
|
||||
array('name' => 'alert.users',
|
||||
'descr' => 'Issue alerts to normal users',
|
||||
'type' => 'checkbox',
|
||||
),
|
||||
array('name' => 'alert.syscontact',
|
||||
'descr' => 'Issue alerts to sysContact',
|
||||
'type' => 'checkbox',
|
||||
|
@@ -282,11 +282,11 @@ function GetContacts($results)
|
||||
if (empty($user['level'])) {
|
||||
$user['level'] = get_userlevel($user['username']);
|
||||
}
|
||||
if ($config["alert"]["globals"] && ( $user['level'] >= 5 && $user['level'] < 10 )) {
|
||||
if ($config['alert']['globals'] && ( $user['level'] >= 5 && $user['level'] < 10 )) {
|
||||
$contacts[$user['email']] = $user['realname'];
|
||||
} elseif ($config["alert"]["admins"] && $user['level'] == 10) {
|
||||
} elseif ($config['alert']['admins'] && $user['level'] == 10) {
|
||||
$contacts[$user['email']] = $user['realname'];
|
||||
} elseif (in_array($user['user_id'], $uids)) {
|
||||
} elseif ($config['alert']['users'] == true && in_array($user['user_id'], $uids)) {
|
||||
$contacts[$user['email']] = $user['realname'];
|
||||
}
|
||||
}
|
||||
|
@@ -42,5 +42,11 @@
|
||||
https://t.libren.ms/5fglp</description>
|
||||
<pubDate>Mon, 1 May 2017 20:00:00 +0000</pubDate>
|
||||
</item>
|
||||
<item>
|
||||
<title>Update to alerting to normal users</title>
|
||||
<description>We have released an update to fix normal users receiving alerts with no ability to turn this off. An option is now available within the General alert settings section to
|
||||
enable this. Please note that the default is off to match with the other default contact settings. If you expect normal users to receive alerts then you should enable this new option.</description>
|
||||
<pubDate>Mon, 15 May 2017 23:00:00 +0000</pubDate>
|
||||
</item>
|
||||
</channel>
|
||||
</rss>
|
||||
|
1
sql-schema/191.sql
Normal file
1
sql-schema/191.sql
Normal file
@@ -0,0 +1 @@
|
||||
INSERT INTO config (config_name,config_value,config_default,config_descr,config_group,config_group_order,config_sub_group,config_sub_group_order,config_hidden,config_disabled) values ('alert.users',false,false,'Issue alerts to normal users','alerting',0,'general',0 ,'0' ,'0');
|
Reference in New Issue
Block a user