From ec1cb553b60314cadce24d5360de61e43c42e344 Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Tue, 22 Dec 2015 02:58:34 -0600 Subject: [PATCH] RT#38217 Send email when logging conditions are met [added null_right and msgtype] --- FS/FS/log.pm | 1 + httemplate/search/cust_msg.html | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/FS/FS/log.pm b/FS/FS/log.pm index 18ba7c936..769d6fce1 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 fdb72a503..ef96f1310 100644 --- a/httemplate/search/cust_msg.html +++ b/httemplate/search/cust_msg.html @@ -62,8 +62,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 ); -- 2.11.0