[Rt-commit] r16142 - in rt/3.8/trunk: . share/html/Approvals share/html/Elements
elacour at bestpractical.com
elacour at bestpractical.com
Mon Sep 29 04:15:16 EDT 2008
Author: elacour
Date: Mon Sep 29 04:15:15 2008
New Revision: 16142
Added:
rt/3.8/trunk/share/html/Approvals/autohandler
Modified:
rt/3.8/trunk/ (props changed)
rt/3.8/trunk/UPGRADING
rt/3.8/trunk/lib/RT/System.pm
rt/3.8/trunk/share/html/Elements/Tabs
Log:
r10809 at datura: manu | 2008-09-29 10:14:43 +0200
Add a ShowApprovalsTab right to allow/disallow access to Approvals and
hide/unhide the Approvals tab.
Modified: rt/3.8/trunk/UPGRADING
==============================================================================
--- rt/3.8/trunk/UPGRADING (original)
+++ rt/3.8/trunk/UPGRADING Mon Sep 29 04:15:15 2008
@@ -16,6 +16,13 @@
*******
+UPGRADING FROM 3.8.1 and earlier - Changes:
+
+= Rights changes =
+
+Now, if you want any user to be able to access the Approvals tools (a.k.a. the
+Approvals tab), you must grant that user the "ShowApprovalsTab" right.
+
UPGRADING FROM 3.8.0 and earlier - Changes:
Searches for bookmarked tickets have been reimplemented and syntax has
Modified: rt/3.8/trunk/lib/RT/System.pm
==============================================================================
--- rt/3.8/trunk/lib/RT/System.pm (original)
+++ rt/3.8/trunk/lib/RT/System.pm Mon Sep 29 04:15:15 2008
@@ -87,6 +87,7 @@
DelegateRights =>
"Delegate specific rights which have been granted to you.", # loc_pair
ShowConfigTab => "show Configuration tab", # loc_pair
+ ShowApprovalsTab => "show Approvals tab", # loc_pair
LoadSavedSearch => "allow loading of saved searches", # loc_pair
CreateSavedSearch => "allow creation of saved searches", # loc_pair
};
Added: rt/3.8/trunk/share/html/Approvals/autohandler
==============================================================================
--- (empty file)
+++ rt/3.8/trunk/share/html/Approvals/autohandler Mon Sep 29 04:15:15 2008
@@ -0,0 +1,53 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2008 Best Practical Solutions, LLC
+%# <jesse 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>
+$m->call_next(%ARGS) if $session{'CurrentUser'}->UserObj->HasRight(
+ Right => 'ShowApprovalsTab',
+ Object => $RT::System,
+);
+</%init>
Modified: rt/3.8/trunk/share/html/Elements/Tabs
==============================================================================
--- rt/3.8/trunk/share/html/Elements/Tabs (original)
+++ rt/3.8/trunk/share/html/Elements/Tabs Mon Sep 29 04:15:15 2008
@@ -77,9 +77,6 @@
C => { title => loc('Tools'),
path => 'Tools/index.html'
},
- P => { title => loc('Approval'),
- path => 'Approvals/'
- },
};
if ($session{'CurrentUser'}->HasRight( Right => 'ShowConfigTab',
@@ -96,6 +93,13 @@
};
}
+if ($session{'CurrentUser'}->HasRight( Right => 'ShowApprovalsTab',
+ Object => $RT::System )) {
+ $basetabs->{P} = { title => loc('Approval'),
+ path => 'Approvals/'
+ };
+}
+
if (!defined $toptabs) {
$toptabs = $basetabs;
}
More information about the Rt-commit
mailing list