[Rt-commit] rt branch, 4.4/custom-roles, repushed
Shawn Moore
shawn at bestpractical.com
Tue Oct 27 11:42:20 EDT 2015
The branch 4.4/custom-roles was deleted and repushed:
was ed0ff0ce8be0d6b511c8cdee6aed5b4e03c8addf
now bd4137fc4ff8112e937525320021687588c5e575
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: ce5900a Switch several hardcoded lists to use ->Roles
8: e5b9caa = 8: e5b9caa Avoid empty results and undef warnings in bulk update
9: b9ef253 = 9: b9ef253 Tidy AddWatchers
10: 5e0924c = 10: 5e0924c Use the record we have for inspecting roles, rather than class RT::Queue
11: 7f93bb4 = 11: 7f93bb4 Add a CheckRight param to ->RoleGroup
12: 6d51036 = 12: 6d51036 Fix one-off "Administrative Cc" with "AdminCc"
13: 319727e = 13: 319727e Provide queue to EditBasics for new tickets that don't have a ->QueueObj
14: b4f7d39 = 14: b4f7d39 Provide defaults to EditBasics for "Add More Attach" etc
15: be9c040 = 15: be9c040 Factor out a CanonicalizePrincipal from AddRoleMember
16: dc9cbb0 = 16: dc9cbb0 Consistent error message across AddRoleMember and DeleteRoleMember
17: 1a64c0e = 17: 1a64c0e Factor out a _CreateRoleGroup
18: 0ac9041 ! 18: 20b06e1 Lazily create ticket role groups if needed
@@ -1,8 +1,6 @@
Author: Shawn M Moore <shawn at bestpractical.com>
Lazily create ticket role groups if needed
-
- XXXXXXXX THIDS NEEDS TO HAPPEN AFTER _CREATEROLEGORUP REFACTOR
diff --git a/lib/RT/Record/Role/Roles.pm b/lib/RT/Record/Role/Roles.pm
--- a/lib/RT/Record/Role/Roles.pm
19: 2dd0512 ! 19: 7c8bc23 Use queue to resolve roles on create since the ticket isn't created yet
@@ -2,9 +2,10 @@
Use queue to resolve roles on create since the ticket isn't created yet
- _ResolveRoles is just canonicalizes role members from a string of email
- addresses, group ids, etc to arrayrefs of principals. It's not ticket specific,
- and so this change has no direct side effects, but it's required for custom roles.
+ _ResolveRoles just canonicalizes role members from a string of email
+ addresses, group ids, etc to arrayrefs of principals. It's not ticket
+ specific, and so this change has no direct side effects, but it's required
+ for custom roles.
diff --git a/lib/RT/Ticket.pm b/lib/RT/Ticket.pm
--- a/lib/RT/Ticket.pm
20: fa5e8fc = 20: 5fa0b4e Process watcher updates from ticket Modify
21: 434eaec = 21: 5b14a2a Improve messaging around updating queue/ticket watchers
22: c25583c = 22: 1a90fc0 Additional option for roles
23: 23b15ab = 23: 5383068 Tidy watcher searching in RT::Tickets
24: 1ed2e23 = 24: b22e5cd Improve comments around GetPrincipalsMap
25: b14540f = 25: c7a1b97 Add a Group->Label hook for when we display a group's name in the UI
26: 936e744 = 26: 5121628 Switch to ->LabelForRole
27: 3dcd0eb ! 27: 0d3752c Add custom roles for queues
@@ -2797,10 +2797,12 @@
--- a/share/html/Ticket/Elements/EditPeople
+++ b/share/html/Ticket/Elements/EditPeople
@@
+ GroupString => $GroupString, GroupOp => $GroupOp,
GroupField => $GroupField, PrivilegedOnly => $PrivilegedOnly &>
</td><td valign="top">
- <h3><&|/l&>Owner</&></h3>
+-<h3><&|/l&>Owner</&></h3>
-<&|/l&>Owner</&>: <& /Elements/SelectOwner, Name => 'Owner', QueueObj => $Ticket->QueueObj, TicketObj => $Ticket, Default => $Ticket->OwnerObj->Id, DefaultValue => 0&>
++<h3><&|/l&>People</&></h3>
+<table>
+
+<tr>
28: dd3759d = 28: 684be51 @CustomRoles in initialdata, support CustomRole in @ACL
29: 1678043 ! 29: 09dd47e Add custom roles to search builder
@@ -43,9 +43,8 @@
+ my $roles = RT::CustomRoles->new( $self->CurrentUser );
+ $roles->Limit( FIELD => 'Name', VALUE => $field, CASESENSITIVE => 0 );
+
-+ # if there is more then one role the current user can
-+ # see with the same name then we shouldn't return role object
-+ # as we don't know which one to use
++ # custom roles are named uniquely, but just in case there are
++ # multiple matches, bail out as we don't know which one to use
+ $role = $roles->First;
+ if ( $role ) {
+ $role = undef if $roles->Next;
30: ed0ff0c = 30: bd4137f Ensure custom role name uniqueness in rt-validator
More information about the rt-commit
mailing list