Skip to content

Commit 0c0dd46

Browse files
author
Massimiliano
committed
Show DNS Slave Zone menu only if enabled by limits.
1 parent fefa02d commit 0c0dd46

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

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

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
$userid=$app->auth->get_user_id();
4+
35
$module["name"] = "dns";
46
$module["title"] = "top_menu_dns";
57
$module["template"] = "module.tpl.htm";
@@ -56,19 +58,23 @@
5658

5759
unset($items);
5860

59-
$items[] = array( 'title' => "Secondary Zones",
60-
'target' => 'content',
61-
'link' => 'dns/dns_slave_list.php',
62-
'html_id' => 'dns_slave_list');
63-
64-
$module["nav"][] = array( 'title' => 'Secondary DNS',
65-
'open' => 1,
66-
'items' => $items);
61+
if($app->auth->get_client_limit($userid, 'dns_slave_zone') != 0)
62+
{
63+
$items[] = array( 'title' => "Secondary Zones",
64+
'target' => 'content',
65+
'link' => 'dns/dns_slave_list.php',
66+
'html_id' => 'dns_slave_list');
67+
68+
$module["nav"][] = array( 'title' => 'Secondary DNS',
69+
'open' => 1,
70+
'items' => $items);
71+
72+
unset($items);
73+
}
6774

68-
unset($items);
6975

7076

7177

7278

7379

74-
?>
80+
?>

0 commit comments

Comments
 (0)