[Rt-commit] rt branch, 4.4/custom-roles, repushed

Shawn Moore shawn at bestpractical.com
Tue Oct 27 12:05:26 EDT 2015


The branch 4.4/custom-roles was deleted and repushed:
       was bd4137fc4ff8112e937525320021687588c5e575
       now 670ddf8b97d4a83da0ff494c52d93b5e5fe1103f

 1:  3da168a =  1:  3da168a Tidy EmailInput and avoid including unescaped parameters
 2:  f4a3966 =  2:  f4a3966 Placeholder and EntryHint for EmailInput
 3:  5b777ea =  3:  5b777ea Support autocomplete-return for EmailInput
 4:  1168416 =  4:  1168416 Support for (by default, off) autocomplete of Nobody and System
 5:  87d20c2 =  5:  87d20c2 Only include one copy of "check box to delete" for queue watchers
 6:  7c59fae =  6:  7c59fae Simplify IsManageableRoleGroupType
 7:  ce5900a !  7:  78cbe3d Switch several hardcoded lists to use ->Roles
    @@ -42,7 +42,7 @@
          my %acls = (
     -        Cc        => sub { 1 },
     -        Requestor => sub { 1 },
    -+        map { $_ => $always_ok } $QueueObj->Roles,
    ++        (map { $_ => $always_ok } $QueueObj->Roles),
     +
              AdminCc   => sub {
                  my $principal = shift;
 8:  e5b9caa =  8:  8b8897b Avoid empty results and undef warnings in bulk update
 9:  b9ef253 =  9:  89d776e Tidy AddWatchers
10:  5e0924c = 10:  accaf5b Use the record we have for inspecting roles, rather than class RT::Queue
11:  7f93bb4 = 11:  3d5ba26 Add a CheckRight param to ->RoleGroup
12:  6d51036 = 12:  f467d55 Fix one-off "Administrative Cc" with "AdminCc"
13:  319727e = 13:  1c0c7d0 Provide queue to EditBasics for new tickets that don't have a ->QueueObj
14:  b4f7d39 = 14:  4caef7d Provide defaults to EditBasics for "Add More Attach" etc
15:  be9c040 = 15:  a31d308 Factor out a CanonicalizePrincipal from AddRoleMember
16:  dc9cbb0 = 16:  60c36e3 Consistent error message across AddRoleMember and DeleteRoleMember
17:  1a64c0e = 17:  5a4f796 Factor out a _CreateRoleGroup
18:  20b06e1 = 18:  56ba03b Lazily create ticket role groups if needed
19:  7c8bc23 = 19:  adb0fa2 Use queue to resolve roles on create since the ticket isn't created yet
20:  5fa0b4e = 20:  6b9319e Process watcher updates from ticket Modify
21:  5b14a2a ! 21:  0fe95ea Improve messaging around updating queue/ticket watchers
    @@ -10,7 +10,7 @@
          return ( 0, $msg) unless $principal;
      
     -    return ( 1, $self->loc("Added [_1] to members of [_2] for this queue.",
    -+    return ( 1, $self->loc("Added [_1] as a member of [_2] for this queue",
    ++    return ( 1, $self->loc("Added [_1] as [_2] for this queue",
                                 $principal->Object->Name, $self->loc($args{'Type'}) ));
      }
      
    @@ -19,9 +19,22 @@
          return ( 0, $msg) unless $principal;
      
     -    return ( 1, $self->loc("Removed [_1] from members of [_2] for this queue.",
    -+    return ( 1, $self->loc("[_1] is no longer a member of [_2] for this queue",
    ++    return ( 1, $self->loc("[_1] is no longer [_2] for this queue",
                                 $principal->Object->Name, $self->loc($args{'Type'}) ));
      }
    + 
    +
    +diff --git a/lib/RT/Record/Role/Roles.pm b/lib/RT/Record/Role/Roles.pm
    +--- a/lib/RT/Record/Role/Roles.pm
    ++++ b/lib/RT/Record/Role/Roles.pm
    +@@
    +         }
    +     }
    + 
    +-    return (0, $self->loc('[_1] is already a [_2]',
    ++    return (0, $self->loc('[_1] is already [_2]',
    +                           $principal->Object->Name, $self->loc($type)) )
    +             if $group->HasMember( $principal );
      
     
     diff --git a/lib/RT/Ticket.pm b/lib/RT/Ticket.pm
    @@ -69,7 +82,7 @@
     +                       loc($args{Type}), $original_user->Name, $principal->Object->Name ) );
     +    }
     +    else {
    -+        return ( 1, $self->loc('Added [_1] as a member of [_2] for this ticket',
    ++        return ( 1, $self->loc('Added [_1] as [_2] for this ticket',
     +                    $principal->Object->Name, $self->loc($args{Type})) );
     +    }
      }
    @@ -80,8 +93,30 @@
      
          return ( 1,
     -             $self->loc( "[_1] is no longer a [_2] for this ticket.",
    -+             $self->loc( "[_1] is no longer a member of [_2] for this ticket",
    ++             $self->loc( "[_1] is no longer [_2] for this ticket",
                               $principal->Object->Name,
                               $self->loc($args{'Type'}) ) );
      }
     
    +diff --git a/t/web/ticket_modify_all.t b/t/web/ticket_modify_all.t
    +--- a/t/web/ticket_modify_all.t
    ++++ b/t/web/ticket_modify_all.t
    +@@
    + $m->field(WatcherAddressEmail => 'root at localhost');
    + $m->click('SubmitTicket');
    + $m->text_contains(
    +-    "Added root as a Requestor for this ticket",
    ++    "Added root as Requestor for this ticket",
    +     'watcher is added',
    + );
    + $m->form_name('TicketModifyAll');
    +@@
    + $m->field(WatcherAddressEmail => 'root at localhost');
    + $m->click('SubmitTicket');
    + $m->text_contains(
    +-    "root is already a Requestor",
    ++    "root is already Requestor",
    +     'no duplicate watchers',
    + );
    + 
    +
22:  1a90fc0 = 22:  7f30e06 Additional option for roles
23:  5383068 = 23:  67d5005 Tidy watcher searching in RT::Tickets
24:  b22e5cd = 24:  708ac1e Improve comments around GetPrincipalsMap
25:  c7a1b97 ! 25:  a96e16e Add a Group->Label hook for when we display a group's name in the UI
    @@ -62,7 +62,7 @@
          return ( 0, $msg) unless $principal;
      
     +    my $group = $self->RoleGroup( $args{Type} );
    -     return ( 1, $self->loc("Added [_1] as a member of [_2] for this queue",
    +     return ( 1, $self->loc("Added [_1] as [_2] for this queue",
     -                           $principal->Object->Name, $self->loc($args{'Type'}) ));
     +                           $principal->Object->Name, $group->Label ));
      }
    @@ -73,7 +73,7 @@
          return ( 0, $msg) unless $principal;
      
     +    my $group = $self->RoleGroup( $args{Type} );
    -     return ( 1, $self->loc("[_1] is no longer a member of [_2] for this queue",
    +     return ( 1, $self->loc("[_1] is no longer [_2] for this queue",
     -                           $principal->Object->Name, $self->loc($args{'Type'}) ));
     +                           $principal->Object->Name, $group->Label ));
      }
    @@ -86,7 +86,7 @@
     @@
          }
      
    -     return (0, $self->loc('[_1] is already a [_2]',
    +     return (0, $self->loc('[_1] is already [_2]',
     -                          $principal->Object->Name, $self->loc($type)) )
     +                          $principal->Object->Name, $group->Label) )
                  if $group->HasMember( $principal );
    @@ -117,7 +117,7 @@
     +                       $group->Label, $original_user->Name, $principal->Object->Name ) );
          }
          else {
    -         return ( 1, $self->loc('Added [_1] as a member of [_2] for this ticket',
    +         return ( 1, $self->loc('Added [_1] as [_2] for this ticket',
     -                    $principal->Object->Name, $self->loc($args{Type})) );
     +                    $principal->Object->Name, $group->Label) );
          }
    @@ -129,7 +129,7 @@
      
     +    my $group = $self->RoleGroup( $args{Type} );
          return ( 1,
    -              $self->loc( "[_1] is no longer a member of [_2] for this ticket",
    +              $self->loc( "[_1] is no longer [_2] for this ticket",
                               $principal->Object->Name,
     -                         $self->loc($args{'Type'}) ) );
     +                         $group->Label ) );
26:  5121628 = 26:  826cbba Switch to ->LabelForRole
27:  0d3752c = 27:  c9059b7 Add custom roles for queues
28:  684be51 = 28:  307dc74 @CustomRoles in initialdata, support CustomRole in @ACL
29:  09dd47e = 29:  4d3a340 Add custom roles to search builder
30:  bd4137f = 30:  670ddf8 Ensure custom role name uniqueness in rt-validator



More information about the rt-commit mailing list