]> git.uio.no Git - usit-rt.git/blobdiff - share/html/m/ticket/show
Upgrade to 4.0.10.
[usit-rt.git] / share / html / m / ticket / show
index f6ffe88baa1bd45d25993c7c9eb4705ef7891c83..df16eb28e464ea2581d6af4f85b44deac91294e5 100644 (file)
@@ -2,7 +2,7 @@
 %#
 %# COPYRIGHT:
 %#
-%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
 %#                                          <sales@bestpractical.com>
 %#
 %# (Except where explicitly superseded by other copyright notices)
@@ -112,10 +112,12 @@ if ($ARGS{'id'} eq 'new') {
     push @Actions, ProcessObjectCustomFieldUpdates(ARGSRef => \%ARGS, TicketObj => $Ticket );
     push @Actions, ProcessTicketReminders( ARGSRef => \%ARGS, TicketObj => $Ticket );
 
-    # XXX: we shouldn't block actions here if user has no right to see the ticket,
-    # but we should allow him to see actions he has done
     unless ($Ticket->CurrentUserHasRight('ShowTicket')) {
-        Abort("No permission to view ticket");
+        if (@Actions) {
+            Abort("A change was applied successfully, but you no longer have permissions to view the ticket", Actions => \@Actions);
+        } else {
+            Abort("No permission to view ticket");
+        }
     }
     if ( $ARGS{'MarkAsSeen'} ) {
         $Ticket->SetAttribute(
@@ -244,6 +246,10 @@ my $print_value = sub {
  <div class="entry">
     <div class="label queue"><&|/l&>Queue</&>:</div>
     <div class="value queue"><& /Ticket/Elements/ShowQueue, QueueObj => $Ticket->QueueObj &></div>
+  </div>
+ <div class="entry">
+    <div class="label bookmark"><&|/l&>Bookmark</&>:</div>
+    <div class="value bookmark"><& /Ticket/Elements/Bookmark, id => $Ticket->id &></div>
   </div>
     </&>