From 0aea6ab1b9be46c3393b6e60b36644a0c4db510b Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Mon, 26 Mar 2018 12:23:46 +0200
Subject: [PATCH] Reseller is able to see a list of all clients and not just of
 his own clients in select field in the head of domain list when domain module
 is active.

---
 interface/web/client/list/domain.list.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/interface/web/client/list/domain.list.php b/interface/web/client/list/domain.list.php
index c6f221c53c..8fc81eeef9 100644
--- a/interface/web/client/list/domain.list.php
+++ b/interface/web/client/list/domain.list.php
@@ -93,7 +93,7 @@ $liste["item"][] = array( 'field'  => "sys_groupid",
 	'suffix' => "",
 	'datasource' => array (  'type' => 'SQL',
 		//'querystring' => 'SELECT a.groupid, a.name FROM sys_group a, domain b WHERE (a.groupid = b.sys_groupid) AND ({AUTHSQL-B}) ORDER BY name',
-		'querystring' => "SELECT sys_group.groupid,CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), IF(client.contact_firstname != '', CONCAT(client.contact_firstname, ' '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as name FROM sys_group, client WHERE sys_group.groupid != 1 AND sys_group.client_id = client.client_id ORDER BY client.company_name, client.contact_name",
+		'querystring' => "SELECT sys_group.groupid,CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), IF(client.contact_firstname != '', CONCAT(client.contact_firstname, ' '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as name FROM sys_group, client WHERE sys_group.groupid != 1 AND sys_group.client_id = client.client_id AND {AUTHSQL} ORDER BY client.company_name, client.contact_name",
 		'keyfield'=> 'groupid',
 		'valuefield'=> 'name'
 	),
-- 
GitLab