Merge branch 'ent-8143-Buscador-general-Errores-en-resultados-mostrados' into 'develop'

fixed general search

See merge request artica/pandorafms!4520
This commit is contained in:
Daniel Rodriguez 2021-11-22 15:50:25 +00:00
commit 60f051dca3
2 changed files with 2 additions and 10 deletions

View File

@ -208,14 +208,7 @@ if ($searchpolicies === true) {
$sql = "SELECT id, name, description, id_group, status
FROM tpolicies
WHERE name LIKE '$stringSearchSQL'
AND
(id_group IN ($id_user_groups_str)
OR 1 = (
SELECT is_admin
FROM tusuario
WHERE id_user = 'admin'
)
)
AND id_group IN ($id_user_groups_str)
";
}

View File

@ -225,7 +225,7 @@ if ($searchUsers) {
$user_groups = users_get_groups(
$user['id_user'],
'AR',
false,
$user_can_manage_all
);
@ -236,7 +236,6 @@ if ($searchUsers) {
&& $config['id_user'] != $user['id_user']
|| (users_is_admin($config['id_user']) === false
&& users_is_admin($user['id_user']) === true)
|| $config['id_user'] === $user['id_user']
) {
unset($users[$key]);
} else {