[Rt-commit] rtir branch 5.0-trunk updated. 5.0.3-19-g01dd4fec

BPS Git Server git at git.bestpractical.com
Tue Apr 18 15:44:21 UTC 2023


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rtir".

The branch, 5.0-trunk has been updated
       via  01dd4fecc5467272661d912db4454c91146e8a27 (commit)
       via  06ab0e758f8f4f8128288d59b044db891f8ae164 (commit)
       via  372d42c09647ff7fc89eda39cbc07e7937d3c718 (commit)
       via  bb4b77bf2ca40355abe5bce30f0bff3536901e95 (commit)
      from  c5b0e918051eb5eb860eed8b0338072679b21ff9 (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 01dd4fecc5467272661d912db4454c91146e8a27
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Tue Apr 18 11:44:13 2023 -0400

    Fix Processes typo

diff --git a/docs/UPGRADING-5.0 b/docs/UPGRADING-5.0
index 91079a2f..c51eada8 100644
--- a/docs/UPGRADING-5.0
+++ b/docs/UPGRADING-5.0
@@ -246,7 +246,7 @@ moving the scrip to Batch mode may restore the previous behavior.
 
 =over 4
 
-=item * Processes Articles for Incidents
+=item * Process Articles for Incidents
 
 Starting with RTIR 5.0.4, we include a new portlet on the Incident page
 which can show the process to be followed for an Incident based on the

commit 06ab0e758f8f4f8128288d59b044db891f8ae164
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Tue Apr 18 11:43:12 2023 -0400

    Note the right change for the Templates class

diff --git a/docs/UPGRADING-5.0 b/docs/UPGRADING-5.0
index e06512f0..91079a2f 100644
--- a/docs/UPGRADING-5.0
+++ b/docs/UPGRADING-5.0
@@ -259,6 +259,17 @@ articles by running the following after your upgrade:
     cd /opt/rt5
     sbin/rt-setup-database --action insert --datafile local/plugins/RT-IR/etc/upgrade/process_articles_initialdata
 
+=item * Allow DutyTeam to See Templates Articles
+
+This upgrade runs a step to grant the default DutyTeam group rights to
+see custom fields in the Templates class. This allows DutyTeam members
+to use articles when corresponding on tickets. This right was previously
+omitted in error.
+
+If you explicitly do not want DutyTeam to see the articles in the Templates
+class, you can edit the class and remove the SeeCustomField right after you
+run the upgrade.
+
 =back
 
 =cut

commit 372d42c09647ff7fc89eda39cbc07e7937d3c718
Merge: c5b0e918 bb4b77bf
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Tue Apr 18 11:27:58 2023 -0400

    Merge branch '5.0/duty-team-view-templates-custom-fields' into 5.0-trunk


commit bb4b77bf2ca40355abe5bce30f0bff3536901e95
Author: craig kaiser <craig at bestpractical.com>
Date:   Thu Aug 26 15:47:49 2021 -0400

    Add 'SeeCustomField' right to DutyTeam on Templates Articles class

diff --git a/etc/initialdata b/etc/initialdata
index 277fe1f6..82fa8e15 100644
--- a/etc/initialdata
+++ b/etc/initialdata
@@ -707,6 +707,10 @@ for my $cf (@CustomFields) {
         my $group = RT::Group->new($CurrentUser);
         $group->LoadUserDefinedGroup("DutyTeam");
         die "Can't load group" unless $group->Id;
+
+        (my $ret, $msg) = $group->PrincipalObj->GrantRight( Right => 'SeeCustomField', Object => $class );
+        die "Could not grant DutyTeam 'SeeCustomField' on class 'Templates': $msg" unless $ret;
+
         $group->PrincipalObj->GrantRight( Right => $_, Object => $response )
             for qw/SeeCustomField ModifyCustomField/;
         $group->PrincipalObj->GrantRight( Right => $_, Object => $class )
diff --git a/etc/upgrade/5.0.4/content b/etc/upgrade/5.0.4/content
new file mode 100644
index 00000000..dd4ed5ee
--- /dev/null
+++ b/etc/upgrade/5.0.4/content
@@ -0,0 +1,16 @@
+our @Final = sub {
+    my $CurrentUser = RT::CurrentUser->new();
+    $CurrentUser->LoadByName('RT_System');
+
+    require RT::Class;
+    my $class = RT::Class->new($CurrentUser);
+    $class->Load('Templates');
+    die "Could not load 'Templates' class: $msg" unless $class->Id;
+
+    my $group = RT::Group->new($CurrentUser);
+    $group->LoadUserDefinedGroup("DutyTeam");
+    die "Can't load group" unless $group->Id;
+
+    (my $ret, $msg) = $group->PrincipalObj->GrantRight( Right => 'SeeCustomField', Object => $class );
+    die "Could not grant DutyTeam 'SeeCustomField' on 'Response': $msg" unless $ret;
+};

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

Summary of changes:
 docs/UPGRADING-5.0        | 13 ++++++++++++-
 etc/initialdata           |  4 ++++
 etc/upgrade/5.0.4/content | 16 ++++++++++++++++
 3 files changed, 32 insertions(+), 1 deletion(-)
 create mode 100644 etc/upgrade/5.0.4/content


hooks/post-receive
-- 
rtir


More information about the rt-commit mailing list