/[smeserver]/rpms/e-smith-base/sme8/e-smith-base-5.2.0-checkMaxUsers.patch
ViewVC logotype

Contents of /rpms/e-smith-base/sme8/e-smith-base-5.2.0-checkMaxUsers.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.5 - (show annotations) (download)
Tue Feb 18 06:21:35 2014 UTC (10 years, 8 months ago) by wellsi
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +0 -0 lines
FILE REMOVED
Remove obsolete patch files

1 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 <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 @@ -249,7 +247,7 @@ __DATA__
42 <subroutine src="print_ipsec_client_section()" />
43 <subroutine src="print_button('SAVE')" />
44 </page>
45 - <page name="CheckMaxUsersUnlock" post-event="checkMaxUsers('ResetPassword')">
46 + <page name="ResetPasswordDummy">
47 </page>
48 <page name="ResetPassword" pre-event="turn_off_buttons()" post-event="reset_password()">
49 <title>RESET_PASSWORD_TITLE</title>
50 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 get_ldap_value
55 username_clash
56 pseudonym_clash
57 - checkMaxUsers
58 handle_user_accounts
59 modify_admin
60 emailforward
61 @@ -181,7 +180,7 @@ sub print_user_table {
62 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 + : $self->get_page_by_name('ResetPasswordDummy');
67
68 # make normal links
69 my $lock_url = ($password_set eq 'yes') ?
70 @@ -608,34 +607,6 @@ sub verifyPasswords {
71
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.

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed