Diag DNS do not show Add Alias if no priv to add alais

This commit is contained in:
Phil Davis 2017-05-21 09:07:56 +05:45
parent 8ce9725941
commit 7fcccc8f09
No known key found for this signature in database
GPG Key ID: 26D7C8081EE13B86

View File

@ -84,7 +84,7 @@ function resolve_host_addresses($host) {
return $resolved;
}
if (isset($_POST['create_alias']) && (is_hostname($host) || is_ipaddr($host))) {
if (isAllowedPage('firewall_aliases_edit.php') && isset($_POST['create_alias']) && (is_hostname($host) || is_ipaddr($host))) {
$resolved = gethostbyname($host);
$type = "hostname";
if ($resolved) {
@ -234,7 +234,7 @@ $form->addGlobal(new Form_Button(
'fa-search'
))->addClass('btn-primary');
if (!empty($resolved)) {
if (!empty($resolved) && isAllowedPage('firewall_aliases_edit.php')) {
if ($alias_exists) {
$button_text = gettext("Update alias");
} else {