From 0b786c8a2efe117ed9357a6d6836f123cb4911c6 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Tue, 29 Jul 2014 14:42:01 -0400
Subject: [PATCH] Fixed: FS#3584 - Misspelling in Postfix Whitelist
---
interface/lib/classes/functions.inc.php | 23 ++++++++++++++++++++++-
1 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/interface/lib/classes/functions.inc.php b/interface/lib/classes/functions.inc.php
index d2ac583..ddee8da 100644
--- a/interface/lib/classes/functions.inc.php
+++ b/interface/lib/classes/functions.inc.php
@@ -275,7 +275,8 @@
if(preg_match($regex, $result['ip'])) $ips[] = $result['ip'];
}
}
-
+
+ /*
$results = $app->db->queryAllRecords("SELECT xfer FROM dns_slave WHERE xfer != ''");
if(!empty($results) && is_array($results)){
foreach($results as $result){
@@ -306,6 +307,8 @@
}
}
}
+ */
+
$results = $app->db->queryAllRecords("SELECT remote_ips FROM web_database WHERE remote_ips != ''");
if(!empty($results) && is_array($results)){
foreach($results as $result){
@@ -421,6 +424,24 @@
return implode("\n", $domains);
}
+ public function is_allowed_user($username, $restrict_names = false) {
+ global $app;
+
+ if($username == 'root') return false;
+ if($restrict_names == true && preg_match('/^web\d+$/', $username) == false) return false;
+
+ return true;
+ }
+
+ public function is_allowed_group($groupname, $restrict_names = false) {
+ global $app;
+
+ if($groupname == 'root') return false;
+ if($restrict_names == true && preg_match('/^client\d+$/', $groupname) == false) return false;
+
+ return true;
+ }
+
}
?>
--
Gitblit v1.9.1