summaryrefslogtreecommitdiff
path: root/rt/webrt/Admin/Users/index.html
blob: 3835137107e2d577a407bda9542b1836e93bad8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<& /Admin/Elements/Header, Title => 'Admin users' &>
<& /Admin/Elements/Tabs, current_tab => 'Admin/Users/' &>


<& /Elements/TitleBoxStart, title => 'Select a user' &>

<TABLE>
<TR>
<TD VALIGN=TOP>

<FORM METHOD=POST ACTION="<% $RT::WebPath %>/Admin/Users/">

Find people whose <& /Elements/SelectUsers &><BR>
<input type="checkbox" name="FindDisabledUsers"> Include disabled users in search.
<BR>
<div align=right><input type=submit value="Go!"></div> 
</FORM>
</TD>
<TD VALIGN=TOP>
<UL>
% if ($session{'CurrentUser'}->HasSystemRight('AdminUsers')) {
<LI><A HREF="<%$RT::WebPath%>/Admin/Users/Modify.html?Create=1">Create a new user</A><BR><BR></LI>
</UL>
% }

<%$caption%><BR>
<UL>
%if ($users->Count == 0) {
<LI> <i>No users matching search criteria found.</i>
% }
%while ( $user = $users->Next) {
<LI><A HREF="Modify.html?id=<%$user->id%>"><%$user->Name || '(no name listed)'%></a></LI>
%}

</UL>
</TD>
</TR>
</TABLE>
<& /Elements/TitleBoxEnd &>

<%INIT>
my ($user, $caption);
my $users = new RT::Users($session{'CurrentUser'});

if ($FindDisabledUsers) {
	$users->{'find_disabled_rows'} = 1;
}

unless (defined $UserString) {
    $users->LimitToPrivileged();
    $caption = "Privileged users";
}
else {
    $caption = "Users matching search criteria";

  if ($UserString) {
	$users->Limit( FIELD => $UserField,
		        OPERATOR => $UserOp,
		       VALUE => $UserString); 

}
}
</%INIT>
<%ARGS>
$UserString => undef
$UserOp => '='
$UserField => 'Name'
$IdLike => undef
$EmailLike => undef
$FindDisabledUsers => 0
</%ARGS>