1 |
slords |
1.2 |
diff -up e-smith-base-5.2.0/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/useraccounts.checkMaxUsers e-smith-base-5.2.0/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/useraccounts |
2 |
|
|
--- e-smith-base-5.2.0/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/useraccounts.checkMaxUsers 2010-10-08 10:24:28.000000000 -0600 |
3 |
|
|
+++ e-smith-base-5.2.0/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/useraccounts 2010-10-08 10:28:51.000000000 -0600 |
4 |
|
|
@@ -11,7 +11,7 @@ |
5 |
|
|
<![CDATA[ |
6 |
|
|
<p> |
7 |
|
|
<a class="button-like" |
8 |
|
|
- href="useraccounts?page=1&page_stack=&Next=Next">Add |
9 |
|
|
+ href="useraccounts?page=0&page_stack=&Next=Next">Add |
10 |
|
|
user account</a> |
11 |
|
|
</p> |
12 |
|
|
<p> |
13 |
|
|
@@ -66,15 +66,6 @@ |
14 |
|
|
<trans>Modify the admin account</trans> |
15 |
|
|
</entry> |
16 |
|
|
<entry> |
17 |
|
|
- <base>MAX_USERS_EXCEEDED</base> |
18 |
|
|
- <trans>ERROR: Unable to add user account. You have reached the |
19 |
|
|
- maximum number of users for which you have licenses. You |
20 |
|
|
- need to either delete an existing user account or contact |
21 |
|
|
- your authorized reseller to purchase |
22 |
|
|
- additional user licenses. |
23 |
|
|
- </trans> |
24 |
|
|
- </entry> |
25 |
|
|
- <entry> |
26 |
|
|
<base>USER_CREATED</base> |
27 |
|
|
<trans>Successfully created user account. </trans> |
28 |
|
|
</entry> |
29 |
|
|
diff -up e-smith-base-5.2.0/root/etc/e-smith/web/functions/useraccounts.checkMaxUsers e-smith-base-5.2.0/root/etc/e-smith/web/functions/useraccounts |
30 |
|
|
--- e-smith-base-5.2.0/root/etc/e-smith/web/functions/useraccounts.checkMaxUsers 2010-10-08 10:24:28.000000000 -0600 |
31 |
|
|
+++ e-smith-base-5.2.0/root/etc/e-smith/web/functions/useraccounts 2010-10-08 10:24:56.000000000 -0600 |
32 |
|
|
@@ -169,8 +169,6 @@ __DATA__ |
33 |
wellsi |
1.1 |
<description>FIRSTPAGE_DESC</description> |
34 |
|
|
<subroutine src="print_user_table()" /> |
35 |
|
|
</page> |
36 |
|
|
- <page name="CheckMaxUsersAdd" post-event="checkMaxUsers('CreateModify')"> |
37 |
|
|
- </page> |
38 |
|
|
<page name="CreateModify" pre-event="turn_off_buttons()" post-event="handle_user_accounts()"> |
39 |
|
|
<title>P2_TITLE</title> |
40 |
|
|
<description>CREATE_MODIFY_DESC</description> |
41 |
slords |
1.3 |
@@ -249,7 +247,7 @@ __DATA__ |
42 |
wellsi |
1.1 |
<subroutine src="print_ipsec_client_section()" /> |
43 |
|
|
<subroutine src="print_button('SAVE')" /> |
44 |
|
|
</page> |
45 |
|
|
- <page name="CheckMaxUsersUnlock" post-event="checkMaxUsers('ResetPassword')"> |
46 |
slords |
1.4 |
+ <page name="ResetPasswordDummy"> |
47 |
slords |
1.3 |
</page> |
48 |
wellsi |
1.1 |
<page name="ResetPassword" pre-event="turn_off_buttons()" post-event="reset_password()"> |
49 |
|
|
<title>RESET_PASSWORD_TITLE</title> |
50 |
slords |
1.2 |
diff -up e-smith-base-5.2.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/useraccounts.pm.checkMaxUsers e-smith-base-5.2.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/useraccounts.pm |
51 |
|
|
--- e-smith-base-5.2.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/useraccounts.pm.checkMaxUsers 2010-10-08 10:24:28.000000000 -0600 |
52 |
|
|
+++ e-smith-base-5.2.0/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/useraccounts.pm 2010-10-08 10:26:18.000000000 -0600 |
53 |
|
|
@@ -42,7 +42,6 @@ our @EXPORT = qw( |
54 |
wellsi |
1.1 |
get_ldap_value |
55 |
|
|
username_clash |
56 |
|
|
pseudonym_clash |
57 |
|
|
- checkMaxUsers |
58 |
|
|
handle_user_accounts |
59 |
|
|
modify_admin |
60 |
|
|
emailforward |
61 |
slords |
1.2 |
@@ -181,7 +180,7 @@ sub print_user_table { |
62 |
wellsi |
1.1 |
my $password_set = $u->prop('PasswordSet'); |
63 |
|
|
|
64 |
|
|
my $pagenum = ($username eq "admin") ? $self->get_page_by_name('SystemPasswordDummy') |
65 |
|
|
- : $self->get_page_by_name('CheckMaxUsersUnlock'); |
66 |
slords |
1.3 |
+ : $self->get_page_by_name('ResetPasswordDummy'); |
67 |
wellsi |
1.1 |
|
68 |
|
|
# make normal links |
69 |
|
|
my $lock_url = ($password_set eq 'yes') ? |
70 |
slords |
1.2 |
@@ -608,34 +607,6 @@ sub verifyPasswords { |
71 |
wellsi |
1.1 |
|
72 |
|
|
=head1 CREATING AND MODIFYING USERS |
73 |
|
|
|
74 |
|
|
-=head2 checkMaxUsers() |
75 |
|
|
- |
76 |
|
|
-Returns an error message if the current number of users is greater than or |
77 |
|
|
-equal to the sysconfig|MaxUsers property. |
78 |
|
|
- |
79 |
|
|
-Takes the name of the next page to go to if the test succeeds as an argument. |
80 |
|
|
- |
81 |
|
|
-=cut |
82 |
|
|
- |
83 |
|
|
-sub checkMaxUsers |
84 |
|
|
-{ |
85 |
|
|
- my ($self, $next_page) = @_; |
86 |
|
|
- |
87 |
|
|
- # Get value of MaxUsers if it exists. |
88 |
|
|
- my $sysconfig = $configdb->get('sysconfig'); |
89 |
|
|
- my $maxUsers = (($sysconfig) ? $sysconfig->prop('MaxUsers') : '') || ''; |
90 |
|
|
- my $activeUsers = scalar $accountdb->activeUsers() || 0; |
91 |
|
|
- if ((defined $activeUsers and $maxUsers ne '') |
92 |
|
|
- and ($activeUsers >= $maxUsers)) |
93 |
|
|
- { |
94 |
|
|
- $self->error('MAX_USERS_EXCEEDED'); |
95 |
|
|
- } |
96 |
|
|
- else |
97 |
|
|
- { |
98 |
|
|
- $self->{cgi}->param(-name => 'wherenext', -value => $next_page); |
99 |
|
|
- } |
100 |
|
|
-} |
101 |
|
|
- |
102 |
|
|
=head2 handle_user_accounts() |
103 |
|
|
|
104 |
|
|
This is the routine called by the "Save" button on the create/modify page. |