import rt 3.0.12
[freeside.git] / rt / html / Admin / Groups / UserRights.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 user rights for group [_1]', $GroupObj->Name) &>
25 <& /Admin/Elements/GroupTabs, 
26     GroupObj => $GroupObj, 
27     current_tab => 'Admin/Groups/UserRights.html?id='.$id, 
28     Title => loc('Modify user rights for group [_1]', $GroupObj->Name) &>  
29 <& /Elements/ListActions, actions => \@results &>
30
31   <FORM METHOD=POST ACTION="UserRights.html">
32     <INPUT TYPE=HIDDEN NAME=id VALUE="<% $GroupObj->id %>">
33       
34 <& /Elements/TitleBoxStart, title => loc('Modify user rights for group [_1]', $GroupObj->Name) &>
35       
36 <TABLE>
37         
38 %       while (my $Member = $Users->Next()) {
39 % my $UserObj = $Member->MemberObj->Object();
40   <TR ALIGN=RIGHT> 
41         <TD VALIGN=TOP>
42             <% $UserObj->Name %>
43                   </TD>
44           <TD>
45             <& /Admin/Elements/SelectRights, PrincipalId => $Member->MemberObj->Id,
46         PrincipalType => 'User', 
47         Object => $GroupObj  &>
48           </TD>
49         </TR>
50 % }
51       </TABLE>
52             
53       <& /Elements/TitleBoxEnd &>
54       <& /Elements/Submit, Label => loc('Modify User Rights'), Reset => 1 &>
55       
56   </FORM>
57   
58 <%INIT>
59  
60   #Update the acls.
61   my @results =  ProcessACLChanges(\%ARGS);
62
63 # {{{ Deal with setting up the display of current rights.
64
65
66 #Define vars used in html above
67
68
69 if (!defined $id) {
70     Abort(loc("No Group defined"));
71 }
72
73 my $GroupObj = RT::Group->new($session{'CurrentUser'});
74 $GroupObj->Load($id) || Abort(loc("Couldn't load group [_1]",$id));
75
76 # Find out which users we want to display ACL selects for
77 my $Privileged = RT::Group->new($session{'CurrentUser'});
78 $Privileged->LoadSystemInternalGroup('Privileged');
79 my $Users = $Privileged->MembersObj();
80
81     
82   
83 # }}}
84     
85 </%INIT>
86
87 <%ARGS>
88 $id => undef
89 $UserString => undef
90 $UserOp => undef
91 $UserField => undef
92 </%ARGS>