150e83f4319ae143f3eb35e5d1978e8cade57b98
[freeside.git] / rt / html / Admin / Global / GroupRights.html
1 %# BEGIN LICENSE BLOCK
2 %# 
3 %# Copyright (c) 1996-2003 Jesse Vincent <jesse@bestpractical.com>
4 %# 
5 %# (Except where explictly superceded by other copyright notices)
6 %# 
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
10 %# from www.gnu.org.
11 %# 
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.
16 %# 
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.
21 %# 
22 %# 
23 %# END LICENSE BLOCK
24 <& /Admin/Elements/Header, Title => loc('Modify global group rights') &>
25 <& /Admin/Elements/SystemTabs, 
26     current_tab => 'Admin/Global/GroupRights.html', 
27     Title => loc('Modify global group rights') &>  
28 <& /Elements/ListActions, actions => \@results &>
29
30   <FORM METHOD=POST ACTION="GroupRights.html">
31       
32 <& /Elements/TitleBoxStart, title => loc('Modify global group rights.')&>
33       
34 <h1><&|/l&>System groups</&></h1>
35 <TABLE>
36 % $Groups = RT::Groups->new($session{'CurrentUser'});
37 % $Groups->LimitToSystemInternalGroups();
38 %       while (my $Group = $Groups->Next()) {
39   <TR ALIGN=RIGHT> 
40         <TD VALIGN=TOP>
41             <% loc($Group->Type) %>
42                   </TD>
43           <TD>
44             <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId,
45         Object  =>$RT::System &>
46           </TD>
47         </TR>
48 % }
49 </TABLE>
50 <h1><&|/l&>Roles</&></h1>
51 <TABLE>
52 % $Groups = RT::Groups->new($session{'CurrentUser'});
53 % $Groups->LimitToRolesForSystem();
54 %       while (my $Group = $Groups->Next()) {
55   <TR ALIGN=RIGHT> 
56         <TD VALIGN=TOP>
57             <% loc($Group->Type) %>
58                   </TD>
59           <TD>
60             <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId,
61         Object  => $RT::System &>
62           </TD>
63         </TR>
64 % }
65 </TABLE>
66 <h1><&|/l&>User defined groups</&></h1>
67 <TABLE>
68 % $Groups = RT::Groups->new($session{'CurrentUser'});
69 % $Groups->LimitToUserDefinedGroups();    
70 %       while (my $Group = $Groups->Next()) {
71   <TR ALIGN=RIGHT> 
72         <TD VALIGN=TOP>
73             <% $Group->Name %>
74                   </TD>
75           <TD>
76             <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId,
77         Object  => $RT::System &>
78           </TD>
79         </TR>
80 % }
81 </TABLE>
82             
83       <& /Elements/TitleBoxEnd &>
84       <& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &>
85       
86   </FORM>
87   
88 <%INIT>
89  
90   #Update the acls.
91   my @results =  ProcessACLChanges(\%ARGS);
92
93
94 my $Groups;
95     
96 </%INIT>
97
98 <%ARGS>
99 </%ARGS>