[freeside-commits] branch FREESIDE_3_BRANCH updated. 09ae8565ecf6d252ab770e5efacd4c305103a34a

Christopher Burger burgerc at 420.am
Wed Aug 16 09:48:03 PDT 2017


The branch, FREESIDE_3_BRANCH has been updated
       via  09ae8565ecf6d252ab770e5efacd4c305103a34a (commit)
       via  0868e3d3883695b4acf8fbb0c61a08f2249af389 (commit)
       via  ab8fb59e7a48c6487ae36493928a5f7f558a61eb (commit)
      from  3b7e4f87515c8137c7f9ef0fcb977e0fecd4d16a (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 09ae8565ecf6d252ab770e5efacd4c305103a34a
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.
    
    Conflicts:
    	FS/FS/access_right.pm

diff --git a/FS/FS/AccessRight.pm b/FS/FS/AccessRight.pm
index 40b5b37..aba5be2 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 c771a15..0bcd84f 100644
--- a/FS/FS/access_right.pm
+++ b/FS/FS/access_right.pm
@@ -252,6 +252,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',
     'Add on-the-fly credit reason' => 'Add on-the-fly refund reason',
     'Resend invoices' => 'Print and mail invoices',
     'List customers' => 'Customers: Customer churn report',
diff --git a/httemplate/elements/notify-tickets.html b/httemplate/elements/notify-tickets.html
index aebbef6..083e815 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 0868e3d3883695b4acf8fbb0c61a08f2249af389
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 ededf9e..40b5b37 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 967468b..77add5d 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -5619,13 +5619,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'     => 'billing',
     'description' => 'Enable per-package balances.',
diff --git a/httemplate/elements/notify-tickets.html b/httemplate/elements/notify-tickets.html
index 0c37074..aebbef6 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 0134e6a..f5b5bb6 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 bf0cc90..d976871 100644
--- a/httemplate/pref/pref.html
+++ b/httemplate/pref/pref.html
@@ -150,13 +150,6 @@ Interface
   </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 ab8fb59e7a48c6487ae36493928a5f7f558a61eb
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 77add5d..967468b 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -5619,6 +5619,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'     => 'billing',
     'description' => 'Enable per-package balances.',
diff --git a/httemplate/elements/notify-tickets.html b/httemplate/elements/notify-tickets.html
index 37a4e84..0c37074 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