[freeside-commits] branch FREESIDE_4_BRANCH updated. 2f455001bfc3c9e82d8147722fd44a4ffea80963

Christopher Burger burgerc at 420.am
Wed Aug 16 09:08:53 PDT 2017


The branch, FREESIDE_4_BRANCH has been updated
       via  2f455001bfc3c9e82d8147722fd44a4ffea80963 (commit)
       via  403aa327f1b10b37dcac39f6cf6ab1f89dcef7f6 (commit)
       via  af965b6e50e539c74dfede0ced874e2a103d42eb (commit)
      from  c7af3fc8437b825afe29ca3bcbedd7bf41404c4d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 2f455001bfc3c9e82d8147722fd44a4ffea80963
Author: Christopher Burger <burgerc at freeside.biz>
Date:   Wed Aug 2 11:44:08 2017 -0400

    RT# 73490 - updated group access right with better name, and set one time migration to update all groups.

diff --git a/FS/FS/AccessRight.pm b/FS/FS/AccessRight.pm
index 301544f..8a81089 100644
--- a/FS/FS/AccessRight.pm
+++ b/FS/FS/AccessRight.pm
@@ -363,7 +363,7 @@ tie my %rights, 'Tie::IxHash',
   #]
 
   #'RT preference rights' => [
-    { rightname=>'not an RT' },
+    { rightname=>'RT activity notification' },
   #]
 
   ],
diff --git a/FS/FS/access_right.pm b/FS/FS/access_right.pm
index 024166d..309d12e 100644
--- a/FS/FS/access_right.pm
+++ b/FS/FS/access_right.pm
@@ -255,6 +255,7 @@ sub _upgrade_data { # class method
     'Unvoid credit' => 'Unvoid credit',
     'Add on-the-fly void credit reason' => 'Add on-the-fly void credit reason',
     '_ALL' => 'Employee preference telephony integration',
+    '_ALL' => 'RT activity notification',
     'Edit customer package dates' => [ 'Change package start date', #4.x
                                        'Change package contract end date',
                                      ],
diff --git a/httemplate/elements/notify-tickets.html b/httemplate/elements/notify-tickets.html
index ce367de..b2541f0 100644
--- a/httemplate/elements/notify-tickets.html
+++ b/httemplate/elements/notify-tickets.html
@@ -14,7 +14,7 @@
 use Class::Load 'load_class';
 
 my $enabled = $FS::TicketSystem::system eq 'RT_Internal';
-$enabled = 0 if $FS::CurrentUser::CurrentUser->access_right('not an RT');
+$enabled = 0 unless $FS::CurrentUser::CurrentUser->access_right('RT activity notification');
 my $UnrepliedTickets;
 if ($enabled) {
   my $class = 'RT::Search::UnrepliedTickets';

commit 403aa327f1b10b37dcac39f6cf6ab1f89dcef7f6
Author: Christopher Burger <burgerc at freeside.biz>
Date:   Tue Aug 1 13:53:42 2017 -0400

    RT # 73490 - removed global conf and user pref check for hide tickets and added group access control.

diff --git a/FS/FS/AccessRight.pm b/FS/FS/AccessRight.pm
index 287d054..301544f 100644
--- a/FS/FS/AccessRight.pm
+++ b/FS/FS/AccessRight.pm
@@ -362,6 +362,10 @@ tie my %rights, 'Tie::IxHash',
     { rightname=>'Employee preference telephony integration' },
   #]
 
+  #'RT preference rights' => [
+    { rightname=>'not an RT' },
+  #]
+
   ],
   
   ###
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index 3053d78..b5b5ec8 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -5340,13 +5340,6 @@ and customer address. Include units.',
   },
 
   {
-    'key'         => 'rt-hide_activity_notification',
-    'section'     => 'ticketing',
-    'description' => 'Hide the notification box when there is activity on tickets',
-    'type'        => 'checkbox',
-  },
-
-  {
     'key'         => 'pkg-balances',
     'section'     => 'packages',
     'description' => 'Enable per-package balances.',
diff --git a/httemplate/elements/notify-tickets.html b/httemplate/elements/notify-tickets.html
index b545063..ce367de 100644
--- a/httemplate/elements/notify-tickets.html
+++ b/httemplate/elements/notify-tickets.html
@@ -13,12 +13,8 @@
 <%init>
 use Class::Load 'load_class';
 
-use FS::Conf;
-my $conf = new FS::Conf;
-
 my $enabled = $FS::TicketSystem::system eq 'RT_Internal';
-$enabled = 0 if $FS::CurrentUser::CurrentUser->option('hide_notify_tickets');
-$enabled = 0 if $conf->exists('rt-hide_activity_notification');
+$enabled = 0 if $FS::CurrentUser::CurrentUser->access_right('not an RT');
 my $UnrepliedTickets;
 if ($enabled) {
   my $class = 'RT::Search::UnrepliedTickets';
diff --git a/httemplate/pref/pref-process.html b/httemplate/pref/pref-process.html
index a87036b..75e5795 100644
--- a/httemplate/pref/pref-process.html
+++ b/httemplate/pref/pref-process.html
@@ -56,7 +56,6 @@ unless ( $error ) { # if ($access_user) {
                       enable_mask_clipboard_hack dashboard_customers
                       customer_view_emails
                       printtofit
-                      hide_notify_tickets
                       email_address
                       snom-ip snom-username snom-password
                       vonage-fromnumber vonage-username vonage-password
diff --git a/httemplate/pref/pref.html b/httemplate/pref/pref.html
index bb21b0f..abd1ea5 100644
--- a/httemplate/pref/pref.html
+++ b/httemplate/pref/pref.html
@@ -137,13 +137,6 @@
   </TR>
 
   <TR>
-    <TH ALIGN="right"><% emt('Hide notification of new ticket activity') %></TH>
-    <TD ALIGN="left">
-      <INPUT TYPE="checkbox" NAME="hide_notify_tickets" VALUE="1" <% $curuser->option('hide_notify_tickets') ? 'CHECKED' : '' %>>
-    </TD>
-  </TR>
-
-  <TR>
     <TH ALIGN="right"><% emt("How many recently-modified customers displayed on dashboard") %></TH>
     <TD ALIGN="left" COLSPAN=2>
       <INPUT TYPE="text" NAME="dashboard_customers" VALUE="<% $curuser->option('dashboard_customers') %>"></TD>

commit af965b6e50e539c74dfede0ced874e2a103d42eb
Author: Christopher Burger <burgerc at freeside.biz>
Date:   Mon Jul 31 09:24:50 2017 -0400

    RT# 73490 - added global configuration to check if RT activity alert should be displayed.

diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index b5b5ec8..3053d78 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -5340,6 +5340,13 @@ and customer address. Include units.',
   },
 
   {
+    'key'         => 'rt-hide_activity_notification',
+    'section'     => 'ticketing',
+    'description' => 'Hide the notification box when there is activity on tickets',
+    'type'        => 'checkbox',
+  },
+
+  {
     'key'         => 'pkg-balances',
     'section'     => 'packages',
     'description' => 'Enable per-package balances.',
diff --git a/httemplate/elements/notify-tickets.html b/httemplate/elements/notify-tickets.html
index 35917c3..b545063 100644
--- a/httemplate/elements/notify-tickets.html
+++ b/httemplate/elements/notify-tickets.html
@@ -13,8 +13,12 @@
 <%init>
 use Class::Load 'load_class';
 
+use FS::Conf;
+my $conf = new FS::Conf;
+
 my $enabled = $FS::TicketSystem::system eq 'RT_Internal';
 $enabled = 0 if $FS::CurrentUser::CurrentUser->option('hide_notify_tickets');
+$enabled = 0 if $conf->exists('rt-hide_activity_notification');
 my $UnrepliedTickets;
 if ($enabled) {
   my $class = 'RT::Search::UnrepliedTickets';

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/AccessRight.pm                    |    4 ++++
 FS/FS/access_right.pm                   |    1 +
 httemplate/elements/notify-tickets.html |    2 +-
 httemplate/pref/pref-process.html       |    1 -
 httemplate/pref/pref.html               |    7 -------
 5 files changed, 6 insertions(+), 9 deletions(-)




More information about the freeside-commits mailing list