[Rt-commit] r8884 -
rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements
ruz at bestpractical.com
ruz at bestpractical.com
Mon Sep 3 19:29:25 EDT 2007
Author: ruz
Date: Mon Sep 3 19:29:25 2007
New Revision: 8884
Modified:
rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/Tabs
Log:
* fix a failing test we've added in prev commit
* ticket owned by nobody, the current user has OwnTicket and
StealTicket rights, but has no TakeTicket or ModifyTicket
rights, we showed Steal link, what is not correct
Modified: rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/Tabs
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/Tabs (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Ticket/Elements/Tabs Mon Sep 3 19:29:25 2007
@@ -164,21 +164,17 @@
}
if ( $Ticket->CurrentUserHasRight('OwnTicket') ) {
- if ( $Ticket->OwnerObj->Id == $RT::Nobody->id
- and ( $can{'ModifyTicket'} or $Ticket->CurrentUserHasRight('TakeTicket') ) )
- {
+ if ( $Ticket->OwnerObj->Id == $RT::Nobody->id ) {
$actions->{'B'} = {
path => "Ticket/Display.html?Action=Take&id=" . $id,
title => loc('Take'),
- };
+ } if $can{'ModifyTicket'} or $Ticket->CurrentUserHasRight('TakeTicket');
}
- elsif ( $Ticket->OwnerObj->id != $session{CurrentUser}->id
- and ( $can{'ModifyTicket'} or $Ticket->CurrentUserHasRight('StealTicket') ) )
- {
+ elsif ( $Ticket->OwnerObj->id != $session{CurrentUser}->id ) {
$actions->{'C'} = {
path => "Ticket/Display.html?Action=Steal&id=" . $id,
title => loc('Steal'),
- };
+ } if $can{'ModifyTicket'} or $Ticket->CurrentUserHasRight('StealTicket');
}
}
More information about the Rt-commit
mailing list