[Rt-commit] rtir branch, 2.5-greenville, updated. 4d0b5ac65700b77dea740f98fb82f57f91d38284

Kevin Falcone falcone at bestpractical.com
Tue Oct 27 16:36:37 EDT 2009


The branch, 2.5-greenville has been updated
       via  4d0b5ac65700b77dea740f98fb82f57f91d38284 (commit)
      from  c8c0ef9678f18e24d5fe09eb3fefa106f7015b46 (commit)

Summary of changes:
 html/RTIR/Incident/Elements/ShowChildren |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

- Log -----------------------------------------------------------------
commit 4d0b5ac65700b77dea740f98fb82f57f91d38284
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Tue Oct 27 16:35:49 2009 -0400

    Hide Launch link if the user can't actually Launch an investigation
    
    (Yes, this is a weird use case, but RTIR works even with pared back
     rights on Investigations, except this part is really confusing)

diff --git a/html/RTIR/Incident/Elements/ShowChildren b/html/RTIR/Incident/Elements/ShowChildren
index 809e00c..aec268e 100644
--- a/html/RTIR/Incident/Elements/ShowChildren
+++ b/html/RTIR/Incident/Elements/ShowChildren
@@ -11,7 +11,9 @@
 
 % if ( $IncidentObj->CurrentUserHasRight('ModifyTicket') ) {
     <table width="100%"><tr><td align="right"><font size="-1">
+%   if ( $QueueObj->Id and $QueueObj->CurrentUserHasRight('CreateTicket') ) {
         | <a href="<%RT->Config->Get('WebPath')%>/RTIR/Create.html?Incident=<% $id %>&Queue=<% $Queue |u %>"><% $new_caption %></a> 
+%   }
         | <a href="<%RT->Config->Get('WebPath')%>/RTIR/Incident/LinkChildren.html?id=<% $id %>&Queue=<% $Queue |u %>"><%loc("Link")%></a> |
     </font></td></tr></table>
 % }
@@ -72,4 +74,7 @@ $inactive->FromSQL(
 
 my $total_count = $active->CountAll + $inactive->CountAll;
 
+my $QueueObj = RT::Queue->new($session{CurrentUser});
+$QueueObj->Load($Queue);
+
 </%INIT>

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


More information about the Rt-commit mailing list