From fe2dbdab03b2c5d7cdffb7ce127c99ceac3506de Mon Sep 17 00:00:00 2001
From: Laurent Pinsivy <lpinsivy@gmail.com>
Date: Wed, 16 Aug 2017 17:35:51 +0200
Subject: [PATCH] #5189 - Allows to remove Resources access from Access Groups

"revert" commit 76e677d326c16a119cdf263d1fb68dad7ad633af but specify table to delete and add WHERE in SQL request.
---
 www/include/options/accessLists/groupsACL/DB-Func.php | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/www/include/options/accessLists/groupsACL/DB-Func.php b/www/include/options/accessLists/groupsACL/DB-Func.php
index a1af9119a9..156933aa64 100644
--- a/www/include/options/accessLists/groupsACL/DB-Func.php
+++ b/www/include/options/accessLists/groupsACL/DB-Func.php
@@ -383,10 +383,10 @@ function updateGroupResources($acl_group_id, $ret = array())
         return;
     }
 
-    $query = 'DELETE '
-        . 'FROM acl_res_group_relations '
-        . 'JOIN acl_resources ar ON acl_res_group_relations.acl_res_id = ar.acl_res_id '
-        . 'AND acl_res_group_relations.acl_group_id = ' . $acl_group_id . ' '
+    $query = 'DELETE argr'
+        . 'FROM acl_res_group_relations argr'
+        . 'JOIN acl_resources ar ON argr.acl_res_id = ar.acl_res_id '
+        . 'WHERE argr.acl_group_id = ' . $acl_group_id . ' '
         . 'AND ar.locked = 0 ';
     $pearDB->query($query);
     if (isset($_POST["resourceAccess"])) {
-- 
GitLab