Skip to content

Commit 965795b

Browse files
committed
Added mail module permissions.
1 parent 22e7f9d commit 965795b

24 files changed

+667
-83
lines changed

interface/lib/classes/tform_actions.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ function onDelete() {
253253
if($this->id > 0) {
254254

255255
// checking permissions
256-
if($app->tform->formDef['auth'] == 'yes') {
256+
if($app->tform->formDef['auth'] == 'yes' && $_SESSION["s"]["user"]["typ"] != 'admin') {
257257
if($app->tform->checkPerm($this->id,'d') == false) $app->error($app->lng('error_no_delete_permission'));
258258
}
259259

interface/web/client/form/client.tform.php

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,17 @@
280280
##################################
281281
# Begin Datatable fields
282282
##################################
283+
'default_mailserver' => array (
284+
'datatype' => 'INTEGER',
285+
'formtype' => 'SELECT',
286+
'default' => '1',
287+
'datasource' => array ( 'type' => 'SQL',
288+
'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} ORDER BY server_name',
289+
'keyfield'=> 'server_id',
290+
'valuefield'=> 'server_name'
291+
),
292+
'value' => ''
293+
),
283294
'limit_maildomain' => array (
284295
'datatype' => 'INTEGER',
285296
'formtype' => 'TEXT',
@@ -322,6 +333,20 @@
322333
'rows' => '',
323334
'cols' => ''
324335
),
336+
'limit_mailforward' => array (
337+
'datatype' => 'INTEGER',
338+
'formtype' => 'TEXT',
339+
'validators' => array ( 0 => array ( 'type' => 'ISINT',
340+
'errmsg'=> 'limit_mailforward_error_notint'),
341+
),
342+
'default' => '-1',
343+
'value' => '',
344+
'separator' => '',
345+
'width' => '10',
346+
'maxlength' => '10',
347+
'rows' => '',
348+
'cols' => ''
349+
),
325350
'limit_mailcatchall' => array (
326351
'datatype' => 'INTEGER',
327352
'formtype' => 'TEXT',
@@ -342,7 +367,7 @@
342367
'validators' => array ( 0 => array ( 'type' => 'ISINT',
343368
'errmsg'=> 'limit_mailrouting_error_notint'),
344369
),
345-
'default' => '-1',
370+
'default' => '0',
346371
'value' => '',
347372
'separator' => '',
348373
'width' => '10',
@@ -392,6 +417,48 @@
392417
'rows' => '',
393418
'cols' => ''
394419
),
420+
'limit_spamfilter_wblist' => array (
421+
'datatype' => 'INTEGER',
422+
'formtype' => 'TEXT',
423+
'validators' => array ( 0 => array ( 'type' => 'ISINT',
424+
'errmsg'=> 'limit_spamfilter_wblist_error_notint'),
425+
),
426+
'default' => '-1',
427+
'value' => '',
428+
'separator' => '',
429+
'width' => '10',
430+
'maxlength' => '10',
431+
'rows' => '',
432+
'cols' => ''
433+
),
434+
'limit_spamfilter_user' => array (
435+
'datatype' => 'INTEGER',
436+
'formtype' => 'TEXT',
437+
'validators' => array ( 0 => array ( 'type' => 'ISINT',
438+
'errmsg'=> 'limit_spamfilter_user_error_notint'),
439+
),
440+
'default' => '-1',
441+
'value' => '',
442+
'separator' => '',
443+
'width' => '10',
444+
'maxlength' => '10',
445+
'rows' => '',
446+
'cols' => ''
447+
),
448+
'limit_spamfilter_policy' => array (
449+
'datatype' => 'INTEGER',
450+
'formtype' => 'TEXT',
451+
'validators' => array ( 0 => array ( 'type' => 'ISINT',
452+
'errmsg'=> 'limit_spamfilter_policy_error_notint'),
453+
),
454+
'default' => '-1',
455+
'value' => '',
456+
'separator' => '',
457+
'width' => '10',
458+
'maxlength' => '10',
459+
'rows' => '',
460+
'cols' => ''
461+
),
395462
##################################
396463
# END Datatable fields
397464
##################################
Lines changed: 47 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,48 @@
1-
<?php
2-
$wb["limit_maildomain_txt"] = 'Max. number of email domains';
3-
$wb["limit_mailbox_txt"] = 'Max. number of mailboxes';
4-
$wb["limit_mailalias_txt"] = 'Max. number of email aliases and redirects';
5-
$wb["limit_mailcatchall_txt"] = 'Max. number of email catchall accounts';
6-
$wb["limit_mailrouting_txt"] = 'Max. number of email routes';
7-
$wb["limit_mailfilter_txt"] = 'Max. number of email filters';
8-
$wb["limit_fetchmail_txt"] = 'Max. number of fetchmail accounts';
9-
$wb["limit_mailquota_txt"] = 'Mailbox quota';
10-
$wb["btn_save_txt"] = 'Save';
11-
$wb["btn_cancel_txt"] = 'Cancel';
12-
$wb["company_name_txt"] = 'Company name';
13-
$wb["contact_name_txt"] = 'Contact name';
14-
$wb["username_txt"] = 'Username';
15-
$wb["password_txt"] = 'Password';
16-
$wb["language_txt"] = 'Language';
17-
$wb["usertheme_txt"] = 'Theme';
18-
$wb["street_txt"] = 'Street';
19-
$wb["zip_txt"] = 'ZIP';
20-
$wb["city_txt"] = 'City';
21-
$wb["state_txt"] = 'State';
22-
$wb["country_txt"] = 'Country';
23-
$wb["telephone_txt"] = 'Telephone';
24-
$wb["mobile_txt"] = 'Mobile';
25-
$wb["fax_txt"] = 'Fax';
26-
$wb["email_txt"] = 'Email';
27-
$wb["internet_txt"] = 'Internet';
28-
$wb["icq_txt"] = 'ICQ';
29-
$wb["notes_txt"] = 'Notes';
30-
$wb["company_txt"] = 'Company';
31-
$wb["title_txt"] = 'Title';
32-
$wb["firstname_txt"] = 'Firstname';
33-
$wb["surname_txt"] = 'Surname';
34-
$wb["limit_client_txt"] = 'limit_client';
35-
$wb["limit_domain_txt"] = 'limit_domain';
36-
$wb["limit_subdomain_txt"] = 'limit_subdomain';
37-
$wb["limit_webquota_txt"] = 'limit_webquota';
38-
$wb["limit_database_txt"] = 'limit_database';
39-
$wb["ip_address_txt"] = 'ip_address';
40-
$wb["limit_client_error_notint"] = 'Client Limit is not a number.';
41-
$wb["firstname_error_empty"] = 'Firstname is empty.';
42-
$wb["contact_error_empty"] = 'Contact name is empty.';
1+
<?php
2+
$wb["limit_maildomain_txt"] = 'Max. number of email domains';
3+
$wb["limit_mailbox_txt"] = 'Max. number of mailboxes';
4+
$wb["limit_mailalias_txt"] = 'Max. number of email aliases';
5+
$wb["limit_mailforward_txt"] = 'Max. number of email forwarders';
6+
$wb["limit_mailcatchall_txt"] = 'Max. number of email catchall accounts';
7+
$wb["limit_mailrouting_txt"] = 'Max. number of email routes';
8+
$wb["limit_mailfilter_txt"] = 'Max. number of email filters';
9+
$wb["limit_fetchmail_txt"] = 'Max. number of fetchmail accounts';
10+
$wb["limit_mailquota_txt"] = 'Mailbox quota';
11+
$wb["limit_spamfilter_wblist_txt"] = 'Max. number of spamfilter white / blacklist filters';
12+
$wb["limit_spamfilter_user_txt"] = 'Max. number of spamfilter users';
13+
$wb["limit_spamfilter_policy_txt"] = 'Max. number of spamfilter policys';
14+
$wb["default_mailserver_txt"] = 'Default Mailserver';
15+
$wb["btn_save_txt"] = 'Save';
16+
$wb["btn_cancel_txt"] = 'Cancel';
17+
$wb["company_name_txt"] = 'Company name';
18+
$wb["contact_name_txt"] = 'Contact name';
19+
$wb["username_txt"] = 'Username';
20+
$wb["password_txt"] = 'Password';
21+
$wb["language_txt"] = 'Language';
22+
$wb["usertheme_txt"] = 'Theme';
23+
$wb["street_txt"] = 'Street';
24+
$wb["zip_txt"] = 'ZIP';
25+
$wb["city_txt"] = 'City';
26+
$wb["state_txt"] = 'State';
27+
$wb["country_txt"] = 'Country';
28+
$wb["telephone_txt"] = 'Telephone';
29+
$wb["mobile_txt"] = 'Mobile';
30+
$wb["fax_txt"] = 'Fax';
31+
$wb["email_txt"] = 'Email';
32+
$wb["internet_txt"] = 'Internet';
33+
$wb["icq_txt"] = 'ICQ';
34+
$wb["notes_txt"] = 'Notes';
35+
$wb["company_txt"] = 'Company';
36+
$wb["title_txt"] = 'Title';
37+
$wb["firstname_txt"] = 'Firstname';
38+
$wb["surname_txt"] = 'Surname';
39+
$wb["limit_client_txt"] = 'limit_client';
40+
$wb["limit_domain_txt"] = 'limit_domain';
41+
$wb["limit_subdomain_txt"] = 'limit_subdomain';
42+
$wb["limit_webquota_txt"] = 'limit_webquota';
43+
$wb["limit_database_txt"] = 'limit_database';
44+
$wb["ip_address_txt"] = 'ip_address';
45+
$wb["limit_client_error_notint"] = 'Client Limit is not a number.';
46+
$wb["firstname_error_empty"] = 'Firstname is empty.';
47+
$wb["contact_error_empty"] = 'Contact name is empty.';
4348
?>

interface/web/client/templates/client_edit_limits.htm

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
11
<table width="500" border="0" cellspacing="0" cellpadding="2">
2+
<tr>
3+
<td><h2>Email</h2></td>
4+
</tr>
5+
<tr>
6+
<td class="frmText11">{tmpl_var name='default_mailserver_txt'}:</td>
7+
<td class="frmText11">
8+
<select name="default_mailserver" class="text">
9+
{tmpl_var name='default_mailserver'}
10+
</select>
11+
</td>
12+
</tr>
213
<tr>
314
<td class="frmText11" width="280">{tmpl_var name='limit_maildomain_txt'}:</td>
415
<td class="frmText11" width="220"><input name="limit_maildomain" type="text" class="text" value="{tmpl_var name='limit_maildomain'}" size="10" maxlength="10"></td>
@@ -11,6 +22,10 @@
1122
<td class="frmText11">{tmpl_var name='limit_mailalias_txt'}:</td>
1223
<td class="frmText11"><input name="limit_mailalias" type="text" class="text" value="{tmpl_var name='limit_mailalias'}" size="10" maxlength="10"></td>
1324
</tr>
25+
<tr>
26+
<td class="frmText11">{tmpl_var name='limit_mailforward_txt'}:</td>
27+
<td class="frmText11"><input name="limit_mailforward" type="text" class="text" value="{tmpl_var name='limit_mailforward'}" size="10" maxlength="10"></td>
28+
</tr>
1429
<tr>
1530
<td class="frmText11">{tmpl_var name='limit_mailcatchall_txt'}:</td>
1631
<td class="frmText11"><input name="limit_mailcatchall" type="text" class="text" value="{tmpl_var name='limit_mailcatchall'}" size="10" maxlength="10"></td>
@@ -30,7 +45,23 @@
3045
<tr>
3146
<td class="frmText11">{tmpl_var name='limit_mailquota_txt'}:</td>
3247
<td class="frmText11"><input name="limit_mailquota" type="text" class="text" value="{tmpl_var name='limit_mailquota'}" size="10" maxlength="10"> MB</td>
33-
</tr> <tr>
48+
</tr>
49+
<tr>
50+
<td><h2>Spamfilter</h2></td>
51+
</tr>
52+
<tr>
53+
<td class="frmText11">{tmpl_var name='limit_spamfilter_wblist_txt'}:</td>
54+
<td class="frmText11"><input name="limit_spamfilter_wblist" type="text" class="text" value="{tmpl_var name='limit_spamfilter_wblist'}" size="10" maxlength="10"></td>
55+
</tr>
56+
<tr>
57+
<td class="frmText11">{tmpl_var name='limit_spamfilter_user_txt'}:</td>
58+
<td class="frmText11"><input name="limit_spamfilter_user" type="text" class="text" value="{tmpl_var name='limit_spamfilter_user'}" size="10" maxlength="10"></td>
59+
</tr>
60+
<tr>
61+
<td class="frmText11">{tmpl_var name='limit_spamfilter_policy_txt'}:</td>
62+
<td class="frmText11"><input name="limit_spamfilter_policy" type="text" class="text" value="{tmpl_var name='limit_spamfilter_policy'}" size="10" maxlength="10"></td>
63+
</tr>
64+
<tr>
3465
<td class="frmText11">&nbsp;</td>
3566
<td class="frmText11">&nbsp;</td>
3667
</tr>

interface/web/mail/lib/lang/en_mail_alias.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ $wb["email_error_isemail"] = 'Email address is invalid.';
88
$wb["email_error_unique"] = 'Duplicate Emailaddress.';
99
$wb["no_domain_perm"] = "You have no permission for this domain.";
1010
$wb["destination_error_isemail"] = 'Destination Emailaddress is invalid.';
11+
$wb["limit_mailalias_txt"] = 'The max. number of email aliases for your account is reached.';
1112
?>

interface/web/mail/lib/lang/en_mail_blacklist.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ $wb["btn_save_txt"] = 'Save';
77
$wb["btn_cancel_txt"] = 'Cancel';
88
$wb["source_error_notempty"] = 'Address is empty.';
99
$wb["type_txt"] = 'Type';
10+
$wb["limit_mailfilter_txt"] = 'The max. number of email filters for your account is reached.';
1011
?>

interface/web/mail/lib/lang/en_mail_domain.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ $wb["domain_error_empty"] = 'Domain is empty.';
99
$wb["domain_error_unique"] = 'Duplicate Domain.';
1010
$wb["domain_error_regex"] = 'Invalid domain name.';
1111
$wb["client_txt"] = 'Client';
12+
$wb["limit_maildomain_txt"] = 'The max. number of email domains for your account is reached.';
1213

1314
?>

interface/web/mail/lib/lang/en_mail_domain_catchall.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ $wb["btn_cancel_txt"] = 'Cancel';
77
$wb["domain_error_unique"] = "There is already a Catchall record for this domain.";
88
$wb["no_domain_perm"] = "You have no permission for this domain.";
99
$wb["domain_error_regex"] = 'Invalid domain name od domain contains invalid characters.';
10+
$wb["limit_mailcatchall_txt"] = 'The max. number of email catchall accounts for your account is reached.';
1011
?>
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
<?php
2-
$wb["email_txt"] = 'Email';
3-
$wb["destination_txt"] = 'Destination Email';
4-
$wb["active_txt"] = 'Active';
5-
$wb["btn_save_txt"] = 'Save';
6-
$wb["btn_cancel_txt"] = 'Cancel';
1+
<?php
2+
$wb["email_txt"] = 'Email';
3+
$wb["destination_txt"] = 'Destination Email';
4+
$wb["active_txt"] = 'Active';
5+
$wb["btn_save_txt"] = 'Save';
6+
$wb["btn_cancel_txt"] = 'Cancel';
7+
$wb["limit_mailforward_txt"] = 'The max. number of email forwarders for your account is reached.';
78
?>

interface/web/mail/lib/lang/en_mail_transport.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ $wb["sort_order_txt"] = 'Sort by';
66
$wb["active_txt"] = 'Active';
77
$wb["btn_save_txt"] = 'Save';
88
$wb["btn_cancel_txt"] = 'Cancel';
9+
$wb["limit_mailrouting_txt"] = 'The max. number of routes for your account is reached.';
910
?>

0 commit comments

Comments
 (0)