From: Jonathan Prykop Date: Tue, 22 Dec 2015 08:58:34 +0000 (-0600) Subject: RT#38217 Send email when logging conditions are met [added null_right and msgtype] X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=d102d05f9b43d77870d5a0ebdb93bf743f479e8d RT#38217 Send email when logging conditions are met [added null_right and msgtype] --- diff --git a/FS/FS/log.pm b/FS/FS/log.pm index b07910528..0c23b1254 100644 --- a/FS/FS/log.pm +++ b/FS/FS/log.pm @@ -110,6 +110,7 @@ sub insert { next; } my $emailerror = $msg_template->send( + 'msgtype' => 'admin', 'to' => $log_email->to_addr, 'substitutions' => { 'loglevel' => $FS::Log::LEVELS[$self->level], # which has hopefully been loaded... diff --git a/httemplate/search/cust_msg.html b/httemplate/search/cust_msg.html index e9aece202..2bfbd7cb0 100644 --- a/httemplate/search/cust_msg.html +++ b/httemplate/search/cust_msg.html @@ -59,8 +59,10 @@ my $conf = new FS::Conf; my $title = 'Outgoing Message Log'; #here is the agent virtualization -my $agentnums_sql = - $FS::CurrentUser::CurrentUser->agentnums_sql( 'table' => 'cust_main' ); +my $agentnums_sql = $FS::CurrentUser::CurrentUser->agentnums_sql( + 'table' => 'cust_main', + 'null_right' => [ 'View system logs', 'Configuration' ], +); my @where = ( $agentnums_sql );