[Rt-commit] rt branch, 4.6/core-group-management-extensions, repushed

Blaine Motsinger blaine at bestpractical.com
Thu Jun 6 14:01:50 EDT 2019


The branch 4.6/core-group-management-extensions was deleted and repushed:
       was 8c5da60f2fb1a6a498fd50f78d86b425540d6999
       now 130a70cf8ad09ea4d76a3134d28d621e2af232fb

1: daf81d1be = 1: daf81d1be Core RT-Extension-GroupLinks
2: 0ff9b75cb = 2: 0ff9b75cb Core RT-Extension-GroupSummary
3: dbaf87d67 ! 3: 97de34d41 Core RT-Extension-GroupSelfService
    @@ -65,151 +65,6 @@
      =head2 AvailableRights
      
     
    -diff --git a/share/html/SelfService/Elements/AfterMyRequests b/share/html/SelfService/Elements/AfterMyRequests
    -new file mode 100644
    ---- /dev/null
    -+++ b/share/html/SelfService/Elements/AfterMyRequests
    -@@
    -+%# BEGIN BPS TAGGED BLOCK {{{
    -+%#
    -+%# COPYRIGHT:
    -+%#
    -+%# This software is Copyright (c) 1996-2019 Best Practical Solutions, LLC
    -+%#                                          <sales at bestpractical.com>
    -+%#
    -+%# (Except where explicitly superseded by other copyright notices)
    -+%#
    -+%#
    -+%# LICENSE:
    -+%#
    -+%# This work is made available to you under the terms of Version 2 of
    -+%# the GNU General Public License. A copy of that license should have
    -+%# been provided with this software, but in any event can be snarfed
    -+%# from www.gnu.org.
    -+%#
    -+%# This work is distributed in the hope that it will be useful, but
    -+%# WITHOUT ANY WARRANTY; without even the implied warranty of
    -+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    -+%# General Public License for more details.
    -+%#
    -+%# You should have received a copy of the GNU General Public License
    -+%# along with this program; if not, write to the Free Software
    -+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    -+%# 02110-1301 or visit their web page on the internet at
    -+%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
    -+%#
    -+%#
    -+%# CONTRIBUTION SUBMISSION POLICY:
    -+%#
    -+%# (The following paragraph is not intended to limit the rights granted
    -+%# to you to modify and distribute this software under the terms of
    -+%# the GNU General Public License and is only of importance to you if
    -+%# you choose to contribute your changes and enhancements to the
    -+%# community by submitting them to Best Practical Solutions, LLC.)
    -+%#
    -+%# By intentionally submitting any modifications, corrections or
    -+%# derivatives to this work, or any other work intended for use with
    -+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
    -+%# you are the copyright holder for those contributions and you grant
    -+%# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
    -+%# royalty-free, perpetual, license to use, copy, create derivative
    -+%# works based on those contributions, and sublicense and distribute
    -+%# those contributions and any derivatives thereof.
    -+%#
    -+%# END BPS TAGGED BLOCK }}}
    -+<& /SelfService/Elements/MyGroupRequests,
    -+    %$ARGSRef,
    -+    status  => $Status,
    -+    title   => loc('My group\'s tickets'),
    -+    BaseURL => RT->Config->Get('WebPath') ."/SelfService/?",
    -+    Page    => $Page,
    -+&>
    -+<%args>
    -+$ARGSRef
    -+$Page => 1
    -+$Status => '__Active__'
    -+</%args>
    -
    -diff --git a/share/html/SelfService/Elements/BeforeMyRequests b/share/html/SelfService/Elements/BeforeMyRequests
    -new file mode 100644
    ---- /dev/null
    -+++ b/share/html/SelfService/Elements/BeforeMyRequests
    -@@
    -+%# BEGIN BPS TAGGED BLOCK {{{
    -+%#
    -+%# COPYRIGHT:
    -+%#
    -+%# This software is Copyright (c) 1996-2019 Best Practical Solutions, LLC
    -+%#                                          <sales at bestpractical.com>
    -+%#
    -+%# (Except where explicitly superseded by other copyright notices)
    -+%#
    -+%#
    -+%# LICENSE:
    -+%#
    -+%# This work is made available to you under the terms of Version 2 of
    -+%# the GNU General Public License. A copy of that license should have
    -+%# been provided with this software, but in any event can be snarfed
    -+%# from www.gnu.org.
    -+%#
    -+%# This work is distributed in the hope that it will be useful, but
    -+%# WITHOUT ANY WARRANTY; without even the implied warranty of
    -+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    -+%# General Public License for more details.
    -+%#
    -+%# You should have received a copy of the GNU General Public License
    -+%# along with this program; if not, write to the Free Software
    -+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    -+%# 02110-1301 or visit their web page on the internet at
    -+%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
    -+%#
    -+%#
    -+%# CONTRIBUTION SUBMISSION POLICY:
    -+%#
    -+%# (The following paragraph is not intended to limit the rights granted
    -+%# to you to modify and distribute this software under the terms of
    -+%# the GNU General Public License and is only of importance to you if
    -+%# you choose to contribute your changes and enhancements to the
    -+%# community by submitting them to Best Practical Solutions, LLC.)
    -+%#
    -+%# By intentionally submitting any modifications, corrections or
    -+%# derivatives to this work, or any other work intended for use with
    -+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
    -+%# you are the copyright holder for those contributions and you grant
    -+%# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
    -+%# royalty-free, perpetual, license to use, copy, create derivative
    -+%# works based on those contributions, and sublicense and distribute
    -+%# those contributions and any derivatives thereof.
    -+%#
    -+%# END BPS TAGGED BLOCK }}}
    -+<%init>
    -+# Find current user's groups and determine if they are a partner
    -+# Load a system user to see all groups without a rights check on whether
    -+# the current user has ShowGroup.
    -+my $user = RT::User->new(RT->SystemUser);
    -+my ($ret, $msg) = $user->Load($session{'CurrentUser'}->Id);
    -+unless ( $ret ){
    -+    RT::Logger->error("Unable to load user record for user: " . $session{'CurrentUser'}->Name . " :$msg");
    -+    return;
    -+}
    -+my $groups_obj = $user->OwnGroups;
    -+my $is_partner;
    -+
    -+while ( my $group = $groups_obj->Next ){
    -+    if ( $group
    -+        and $group->FirstCustomFieldValue("Group Type")
    -+        and $group->FirstCustomFieldValue("Group Type") eq RT->Config->Get('GroupSelfServiceOwnerFilterName') ){
    -+        $is_partner = 1;
    -+        last;
    -+    }
    -+}
    -+
    -+$ARGSRef->{'SortByRole'} = 'Owner' if $is_partner;
    -+</%init>
    -+<%args>
    -+$ARGSRef
    -+</%args>
    -
     diff --git a/share/html/SelfService/Elements/MyGroupRequests b/share/html/SelfService/Elements/MyGroupRequests
     new file mode 100644
     --- /dev/null
    @@ -356,3 +211,48 @@
     +$SortByRole => 'Requestor' # Role to use when determining "My" tickets
      </%ARGS>
     
    +diff --git a/share/html/SelfService/index.html b/share/html/SelfService/index.html
    +--- a/share/html/SelfService/index.html
    ++++ b/share/html/SelfService/index.html
    +@@
    + 
    + % $m->callback(CallbackName => 'AfterMyRequests', ARGSRef => \%ARGS, Page => $Page);
    + 
    ++<& /SelfService/Elements/MyGroupRequests,
    ++    %ARGS,
    ++    status  => '__Active__',
    ++    title   => loc('My group\'s tickets'),
    ++    BaseURL => RT->Config->Get('WebPath') ."/SelfService/?",
    ++    Page    => $Page,
    ++&>
    ++
    ++% $m->callback(CallbackName => 'AfterMyGroupRequests', ARGSRef => \%ARGS, Page => $Page);
    ++
    ++<%init>
    ++# Find current user's groups and determine if they are a partner
    ++# Load a system user to see all groups without a rights check on whether
    ++# the current user has ShowGroup.
    ++my $user = RT::User->new(RT->SystemUser);
    ++my ($ret, $msg) = $user->Load($session{'CurrentUser'}->Id);
    ++unless ( $ret ){
    ++    RT::Logger->error("Unable to load user record for user: " . $session{'CurrentUser'}->Name . " :$msg");
    ++    return;
    ++}
    ++my $groups_obj = $user->OwnGroups;
    ++my $is_partner;
    ++
    ++while ( my $group = $groups_obj->Next ){
    ++    if ( $group
    ++        and $group->FirstCustomFieldValue("Group Type")
    ++        and $group->FirstCustomFieldValue("Group Type") eq RT->Config->Get('GroupSelfServiceOwnerFilterName') ){
    ++        $is_partner = 1;
    ++        last;
    ++    }
    ++}
    ++
    ++$ARGS{'SortByRole'} = 'Owner' if $is_partner;
    ++</%init>
    + <%ARGS>
    + $Page => 1
    + </%ARGS>
    +
-:  ------- > 4: 05543b6a0 Add note to UPGRADING-4.6 for callback changes
4: 8c5da60f2 = 5: 130a70cf8 Fix tests for initialdata change



More information about the rt-commit mailing list