1 |
wellsi |
1.1 |
diff -urN e-smith-base-5.2.0.old/root/etc/e-smith/web/functions/useraccounts e-smith-base-5.2.0/root/etc/e-smith/web/functions/useraccounts |
2 |
|
|
--- e-smith-base-5.2.0.old/root/etc/e-smith/web/functions/useraccounts 2010-06-05 08:51:52.000000000 +0100 |
3 |
|
|
+++ e-smith-base-5.2.0/root/etc/e-smith/web/functions/useraccounts 2010-06-05 09:01:29.000000000 +0100 |
4 |
|
|
@@ -169,8 +169,6 @@ |
5 |
|
|
<description>FIRSTPAGE_DESC</description> |
6 |
|
|
<subroutine src="print_user_table()" /> |
7 |
|
|
</page> |
8 |
|
|
- <page name="CheckMaxUsersAdd" post-event="checkMaxUsers('CreateModify')"> |
9 |
|
|
- </page> |
10 |
|
|
<page name="CreateModify" pre-event="turn_off_buttons()" post-event="handle_user_accounts()"> |
11 |
|
|
<title>P2_TITLE</title> |
12 |
|
|
<description>CREATE_MODIFY_DESC</description> |
13 |
|
|
@@ -249,8 +247,6 @@ |
14 |
|
|
<subroutine src="print_ipsec_client_section()" /> |
15 |
|
|
<subroutine src="print_button('SAVE')" /> |
16 |
|
|
</page> |
17 |
|
|
- <page name="CheckMaxUsersUnlock" post-event="checkMaxUsers('ResetPassword')"> |
18 |
|
|
- </page> |
19 |
|
|
<page name="ResetPassword" pre-event="turn_off_buttons()" post-event="reset_password()"> |
20 |
|
|
<title>RESET_PASSWORD_TITLE</title> |
21 |
|
|
<subroutine src="print_page_description('reset')" /> |
22 |
|
|
diff -urN e-smith-base-5.2.0.old/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/useraccounts.pm e-smith-base-5.2.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/useraccounts.pm |
23 |
|
|
--- e-smith-base-5.2.0.old/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/useraccounts.pm 2010-06-05 08:51:52.000000000 +0100 |
24 |
|
|
+++ e-smith-base-5.2.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/useraccounts.pm 2010-06-05 09:09:17.000000000 +0100 |
25 |
|
|
@@ -42,7 +42,6 @@ |
26 |
|
|
get_ldap_value |
27 |
|
|
username_clash |
28 |
|
|
pseudonym_clash |
29 |
|
|
- checkMaxUsers |
30 |
|
|
handle_user_accounts |
31 |
|
|
modify_admin |
32 |
|
|
emailforward |
33 |
|
|
@@ -181,7 +180,7 @@ |
34 |
|
|
my $password_set = $u->prop('PasswordSet'); |
35 |
|
|
|
36 |
|
|
my $pagenum = ($username eq "admin") ? $self->get_page_by_name('SystemPasswordDummy') |
37 |
|
|
- : $self->get_page_by_name('CheckMaxUsersUnlock'); |
38 |
|
|
+ : $self->get_page_by_name('ResetPassword'); |
39 |
|
|
|
40 |
|
|
# make normal links |
41 |
|
|
my $lock_url = ($password_set eq 'yes') ? |
42 |
|
|
@@ -608,34 +607,6 @@ |
43 |
|
|
|
44 |
|
|
=head1 CREATING AND MODIFYING USERS |
45 |
|
|
|
46 |
|
|
-=head2 checkMaxUsers() |
47 |
|
|
- |
48 |
|
|
-Returns an error message if the current number of users is greater than or |
49 |
|
|
-equal to the sysconfig|MaxUsers property. |
50 |
|
|
- |
51 |
|
|
-Takes the name of the next page to go to if the test succeeds as an argument. |
52 |
|
|
- |
53 |
|
|
-=cut |
54 |
|
|
- |
55 |
|
|
-sub checkMaxUsers |
56 |
|
|
-{ |
57 |
|
|
- my ($self, $next_page) = @_; |
58 |
|
|
- |
59 |
|
|
- # Get value of MaxUsers if it exists. |
60 |
|
|
- my $sysconfig = $configdb->get('sysconfig'); |
61 |
|
|
- my $maxUsers = (($sysconfig) ? $sysconfig->prop('MaxUsers') : '') || ''; |
62 |
|
|
- my $activeUsers = scalar $accountdb->activeUsers() || 0; |
63 |
|
|
- if ((defined $activeUsers and $maxUsers ne '') |
64 |
|
|
- and ($activeUsers >= $maxUsers)) |
65 |
|
|
- { |
66 |
|
|
- $self->error('MAX_USERS_EXCEEDED'); |
67 |
|
|
- } |
68 |
|
|
- else |
69 |
|
|
- { |
70 |
|
|
- $self->{cgi}->param(-name => 'wherenext', -value => $next_page); |
71 |
|
|
- } |
72 |
|
|
-} |
73 |
|
|
- |
74 |
|
|
=head2 handle_user_accounts() |
75 |
|
|
|
76 |
|
|
This is the routine called by the "Save" button on the create/modify page. |