3 %# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
5 %# (Except where explictly superceded by other copyright notices)
7 %# This work is made available to you under the terms of Version 2 of
8 %# the GNU General Public License. A copy of that license should have
9 %# been provided with this software, but in any event can be snarfed
12 %# This work is distributed in the hope that it will be useful, but
13 %# WITHOUT ANY WARRANTY; without even the implied warranty of
14 %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 %# General Public License for more details.
17 %# Unless otherwise specified, all modifications, corrections or
18 %# extensions to this work which alter its source code become the
19 %# property of Best Practical Solutions, LLC when submitted for
20 %# inclusion in the work.
24 <& /Admin/Elements/Header, Title => loc('Modify group rights for queue [_1]', $QueueObj->Name) &>
25 <& /Admin/Elements/QueueTabs, id => $id,
26 QueueObj => $QueueObj,
27 current_tab => $current_tab,
28 Title => loc('Modify group rights for queue [_1]', $QueueObj->Name) &>
29 <& /Elements/ListActions, actions => \@results &>
31 <FORM METHOD=POST ACTION="GroupRights.html">
32 <INPUT TYPE=HIDDEN NAME=id VALUE="<% $QueueObj->id %>">
35 <h1><&|/l&>System groups</&></h1>
37 <& /Elements/Callback, QueueObj => $QueueObj, results => \@results, %ARGS &>
38 % $Groups = RT::Groups->new($session{'CurrentUser'});
39 % $Groups->LimitToSystemInternalGroups();
40 % while (my $Group = $Groups->Next()) {
43 <% loc($Group->Type) %>
46 <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId,
47 Object => $QueueObj &>
52 <h1><&|/l&>Roles</&></h1>
54 % $Groups = RT::Groups->new($session{'CurrentUser'});
55 % $Groups->LimitToRolesForQueue($QueueObj->Id);
56 % while (my $Group = $Groups->Next()) {
59 <% loc($Group->Type) %>
62 <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId,
63 Object => $QueueObj &>
68 <h1><&|/l&>User defined groups</&></h1>
70 % $Groups = RT::Groups->new($session{'CurrentUser'});
71 % $Groups->LimitToUserDefinedGroups();
72 % while (my $Group = $Groups->Next()) {
78 <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId,
79 Object => $QueueObj &>
85 <& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &>
92 my @results = ProcessACLChanges(\%ARGS);
96 Abort(loc("No Queue defined"));
99 my $QueueObj = RT::Queue->new($session{'CurrentUser'});
100 $QueueObj->Load($id) || Abort(loc("Couldn't load queue [_1]",$id));
104 $current_tab = 'Admin/Queues/GroupRights.html?id='.$QueueObj->id;