[Rt-commit] rt branch, 3.9-trunk, updated. rt-3.9.6-315-g2f0ca9b

Ruslan Zakirov ruz at bestpractical.com
Wed Dec 1 16:52:43 EST 2010


The branch, 3.9-trunk has been updated
       via  2f0ca9b7fa3c86917dd789ff9a359fb62b30c339 (commit)
       via  eb35a233da94b452c5eceb4343874617104f7ea3 (commit)
       via  789f7b1099d1b6f3509de4aa92161786184ba3fa (commit)
       via  0666190c8adac5db278ff4a103d843b586c90892 (commit)
       via  23615bf43358e6ae524cea4ece86609199d815e2 (commit)
       via  7d891dc81eb9085bfdb6fa284cece98d263b8c85 (commit)
       via  bd7c5b6d9cecb9b1ef6609dad4bba2afa208bf74 (commit)
       via  6fd6943d47728e376c394c5755d1b8b7f7c9aba4 (commit)
       via  e65867eec12b53bad81f6c463b59c2f2d055b527 (commit)
       via  01449f7e2baf025d837482a45bff6d27a91a8967 (commit)
      from  a532bbbbba596fd02067df1720e704adee392325 (commit)

Summary of changes:
 lib/RT/Principal_Overlay.pm    |  252 +++++++++++++++++++++++++++++++---------
 lib/RT/Test.pm                 |   27 +++++
 share/html/Elements/Tabs       |   49 ++++-----
 share/html/Ticket/Display.html |    2 +
 t/api/has_rights.t             |   43 +++++++
 t/api/rights_show_ticket.t     |   24 +---
 6 files changed, 294 insertions(+), 103 deletions(-)
 create mode 100644 t/api/has_rights.t

- Log -----------------------------------------------------------------
commit 2f0ca9b7fa3c86917dd789ff9a359fb62b30c339
Merge: a532bbb eb35a23
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Thu Dec 2 00:52:32 2010 +0300

    Merge branch '3.9-double_acl_cache' into 3.9-trunk
    
    Conflicts:
    	share/html/Elements/Tabs

diff --cc share/html/Elements/Tabs
index e61e51c,ca3de22..ff54aa4
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@@ -401,37 -365,39 +395,36 @@@ if ( $request_path !~ qr{^/SelfService/
                  $actions->child( forward => title => loc('Forward'), path => "/Ticket/Forward.html?id=" . $id, );
              }
  
 -            if ( $can->('ModifyTicket') ) {
 -                my $current   = $obj->Status;
 -                my $lifecycle = $obj->QueueObj->lifecycle;
 -                my $i         = 1;
 -
 -                foreach my $info ( $lifecycle->actions($current) ) {
 -                    my $next = $info->{'to'};
 -                    next unless $lifecycle->is_transition( $current => $next );
 +            my $current   = $obj->Status;
 +            my $lifecycle = $obj->QueueObj->Lifecycle;
 +            my $i         = 1;
 +            foreach my $info ( $lifecycle->Actions($current) ) {
 +                my $next = $info->{'to'};
 +                next unless $lifecycle->IsTransition( $current => $next );
  
 -                    my $check = $lifecycle->check_right( $current => $next );
 -                    next unless $can->($check);
 +                my $check = $lifecycle->CheckRight( $current => $next );
-                 $can{$check} = $obj->CurrentUserHasRight($check) unless exists $can{$check};
-                 next unless $can{$check};
++                next unless $can->($check);
  
  
 -                   my $action = $info->{'update'} || '';
 +                my $action = $info->{'update'} || '';
  
  
 -                    my $url = '/Ticket/';
 -                    if ($action) {
 +                my $url = '/Ticket/';
 +                if ($action) {
  
 -                        $url .= "Update.html?" . $query_string->(Action => $action,
 -                                               DefaultStatus => $next,
 -                                               id            => $id
 -                                             );
 -                    } else {
 -                        $url .= "Display.html?" . $query_string->( Status => $next, id => $id );
 -                    }
 -                    $actions->child( loc( $info->{'label'} || ucfirst($next) ) => path => $url);
 +                    $url .= "Update.html?" . $query_string->(Action => $action,
 +                                           DefaultStatus => $next,
 +                                           id            => $id
 +                                         );
 +                } else {
 +                    $url .= "Display.html?" . $query_string->( Status => $next, id => $id );
                  }
 -
 +                $actions->child( loc( $info->{'label'} || ucfirst($next) ) => path => $url);
              }
 +
-             if ( $can{OwnTicket} ) {
+             if ( $can->('OwnTicket') ) {
                  if ( $obj->OwnerObj->Id == RT->Nobody->id
-                      && ( $can{'ModifyTicket'} or $can{'TakeTicket'} ) ) {
+                      && ( $can->('ModifyTicket') or $can->('TakeTicket') ) ) {
                      $actions->child( take => path => "/Ticket/Display.html?Action=Take;id=" . $id, title => loc('Take'));
                  }
  

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


More information about the Rt-commit mailing list