Skip to content

Commit 0589b0b

Browse files
author
Marius Burkard
committed
Merge branch 'patch-check-correct-module' into 'stable-3.1'
Check access for backup stats See merge request ispconfig/ispconfig3!965
2 parents 263a5a2 + e82b879 commit 0589b0b

File tree

3 files changed

+16
-13
lines changed

3 files changed

+16
-13
lines changed

interface/web/mail/backup_stats.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
******************************************/
1010

1111
//* Check permissions for module
12-
$app->auth->check_module_permissions('sites');
12+
$app->auth->check_module_permissions('mail');
1313

1414
$app->load('listform_actions','functions');
1515

interface/web/mail/lib/module.conf.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,13 @@
189189
'target' => 'content',
190190
'link' => 'mail/mail_user_stats.php',
191191
'html_id' => 'mail_user_stats');
192-
$items[] = array (
193-
'title' => 'Backup Stats',
194-
'target' => 'content',
195-
'link' => 'mail/backup_stats.php',
196-
'html_id' => 'backup_stats');
197-
192+
if($app->auth->get_client_limit($userid, 'backup') == 'y') {
193+
$items[] = array (
194+
'title' => 'Backup Stats',
195+
'target' => 'content',
196+
'link' => 'mail/backup_stats.php',
197+
'html_id' => 'backup_stats');
198+
}
198199

199200
$module['nav'][] = array( 'title' => 'Statistics',
200201
'open' => 1,

interface/web/sites/lib/module.conf.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -209,12 +209,14 @@
209209
'link' => 'sites/database_quota_stats.php',
210210
'html_id' => 'databse_quota_stats');
211211

212-
$items[] = array (
213-
'title' => 'Backup Stats',
214-
'target' => 'content',
215-
'link' => 'sites/backup_stats.php',
216-
'html_id' => 'backup_stats'
217-
);
212+
if($app->auth->get_client_limit($userid, 'backup') == 'y') {
213+
$items[] = array (
214+
'title' => 'Backup Stats',
215+
'target' => 'content',
216+
'link' => 'sites/backup_stats.php',
217+
'html_id' => 'backup_stats'
218+
);
219+
}
218220

219221
$module['nav'][] = array( 'title' => 'Statistics',
220222
'open' => 1,

0 commit comments

Comments
 (0)