-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathe-smith-base-5.2.0-checkMaxUsers.patch
104 lines (99 loc) · 4.51 KB
/
e-smith-base-5.2.0-checkMaxUsers.patch
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
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
--- 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
+++ 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
@@ -11,7 +11,7 @@
<![CDATA[
<p>
<a class="button-like"
- href="useraccounts?page=1&page_stack=&Next=Next">Add
+ href="useraccounts?page=0&page_stack=&Next=Next">Add
user account</a>
</p>
<p>
@@ -66,15 +66,6 @@
<trans>Modify the admin account</trans>
</entry>
<entry>
- <base>MAX_USERS_EXCEEDED</base>
- <trans>ERROR: Unable to add user account. You have reached the
- maximum number of users for which you have licenses. You
- need to either delete an existing user account or contact
- your authorized reseller to purchase
- additional user licenses.
- </trans>
- </entry>
- <entry>
<base>USER_CREATED</base>
<trans>Successfully created user account. </trans>
</entry>
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
--- e-smith-base-5.2.0/root/etc/e-smith/web/functions/useraccounts.checkMaxUsers 2010-10-08 10:24:28.000000000 -0600
+++ e-smith-base-5.2.0/root/etc/e-smith/web/functions/useraccounts 2010-10-08 10:24:56.000000000 -0600
@@ -169,8 +169,6 @@ __DATA__
<description>FIRSTPAGE_DESC</description>
<subroutine src="print_user_table()" />
</page>
- <page name="CheckMaxUsersAdd" post-event="checkMaxUsers('CreateModify')">
- </page>
<page name="CreateModify" pre-event="turn_off_buttons()" post-event="handle_user_accounts()">
<title>P2_TITLE</title>
<description>CREATE_MODIFY_DESC</description>
@@ -249,7 +247,7 @@ __DATA__
<subroutine src="print_ipsec_client_section()" />
<subroutine src="print_button('SAVE')" />
</page>
- <page name="CheckMaxUsersUnlock" post-event="checkMaxUsers('ResetPassword')">
+ <page name="ResetPasswordDummy">
</page>
<page name="ResetPassword" pre-event="turn_off_buttons()" post-event="reset_password()">
<title>RESET_PASSWORD_TITLE</title>
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
--- 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
+++ 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
@@ -42,7 +42,6 @@ our @EXPORT = qw(
get_ldap_value
username_clash
pseudonym_clash
- checkMaxUsers
handle_user_accounts
modify_admin
emailforward
@@ -181,7 +180,7 @@ sub print_user_table {
my $password_set = $u->prop('PasswordSet');
my $pagenum = ($username eq "admin") ? $self->get_page_by_name('SystemPasswordDummy')
- : $self->get_page_by_name('CheckMaxUsersUnlock');
+ : $self->get_page_by_name('ResetPasswordDummy');
# make normal links
my $lock_url = ($password_set eq 'yes') ?
@@ -608,34 +607,6 @@ sub verifyPasswords {
=head1 CREATING AND MODIFYING USERS
-=head2 checkMaxUsers()
-
-Returns an error message if the current number of users is greater than or
-equal to the sysconfig|MaxUsers property.
-
-Takes the name of the next page to go to if the test succeeds as an argument.
-
-=cut
-
-sub checkMaxUsers
-{
- my ($self, $next_page) = @_;
-
- # Get value of MaxUsers if it exists.
- my $sysconfig = $configdb->get('sysconfig');
- my $maxUsers = (($sysconfig) ? $sysconfig->prop('MaxUsers') : '') || '';
- my $activeUsers = scalar $accountdb->activeUsers() || 0;
- if ((defined $activeUsers and $maxUsers ne '')
- and ($activeUsers >= $maxUsers))
- {
- $self->error('MAX_USERS_EXCEEDED');
- }
- else
- {
- $self->{cgi}->param(-name => 'wherenext', -value => $next_page);
- }
-}
-
=head2 handle_user_accounts()
This is the routine called by the "Save" button on the create/modify page.