2011-01-26 Miguel de Dios <miguel.dedios@artica.es>

* operation/agentes/status_monitor.php: fixed the ACL in the Module name for
	the select box in the filter.

	* operation/search_agents.php: fixed the ACL in the search of agent.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3775 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2011-01-26 18:02:01 +00:00
parent 0c58c8db24
commit d0c6755c8f
3 changed files with 45 additions and 24 deletions

View File

@ -1,3 +1,10 @@
2011-01-26 Miguel de Dios <miguel.dedios@artica.es>
* operation/agentes/status_monitor.php: fixed the ACL in the Module name for
the select box in the filter.
* operation/search_agents.php: fixed the ACL in the search of agent.
2011-01-26 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_html.php: In print_image function checks if skin
path is set for the current user and if it exists add it to the image path.

View File

@ -91,6 +91,11 @@ where nombre <> "delete_pending" and id_agente in
from tperfil where agent_view = 1
)
)
OR
(1 = (
SELECT is_admin FROM tusuario WHERE id_user = "' . $config['id_user'] . '"
)
)
OR 0 IN (
select id_grupo
from tusuario_perfil

View File

@ -106,30 +106,39 @@ switch ($sortField) {
$agents = false;
if ($searchAgents) {
$sql = "
FROM tagente AS t1
INNER JOIN tgrupo
ON tgrupo.id_grupo = t1.id_grupo
WHERE (t1.id_grupo IN (
SELECT id_grupo
FROM tusuario_perfil
WHERE id_usuario = '" . $config['id_user'] . "'
AND id_perfil IN (
SELECT id_perfil
FROM tperfil WHERE agent_view = 1
)
)
OR 0 IN (
SELECT id_grupo
FROM tusuario_perfil
WHERE id_usuario = '" . $config['id_user'] . "'
AND id_perfil IN (
SELECT id_perfil
FROM tperfil WHERE agent_view = 1
)
)
) AND
t1.nombre COLLATE utf8_general_ci LIKE '%" . $stringSearchSQL . "%' OR
tgrupo.nombre LIKE '%" . $stringSearchSQL . "%'";
FROM tagente AS t1
INNER JOIN tgrupo AS t2
ON t2.id_grupo = t1.id_grupo
WHERE
(1 = (
SELECT is_admin FROM tusuario WHERE id_user = '" . $config['id_user'] . "'
)
)
OR
(t1.id_grupo IN (
SELECT id_grupo
FROM tusuario_perfil
WHERE id_usuario = '" . $config['id_user'] . "'
AND id_perfil IN (
SELECT id_perfil
FROM tperfil WHERE agent_view = 1
)
)
OR 0 IN (
SELECT id_grupo
FROM tusuario_perfil
WHERE id_usuario = '" . $config['id_user'] . "'
AND id_perfil IN (
SELECT id_perfil
FROM tperfil WHERE agent_view = 1
)
)
)
AND (
t1.nombre COLLATE utf8_general_ci LIKE '%%" . $stringSearchSQL . "%%' OR
t2.nombre COLLATE utf8_general_ci LIKE '%%" . $stringSearchSQL . "%%'
)
";
$select = "SELECT t1.id_agente, t1.ultimo_contacto, t1.nombre, t1.id_os, t1.intervalo, t1.id_grupo, t1.disabled";