2014-05-05 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* pandora_console/include/functions_groups.php pandora_console/include/functions_events.php: Fixed bug in event viewer. A user could not be assigned himself as the owner of the event. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9864 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
0d8e3a511b
commit
95685610b2
|
@ -1,3 +1,16 @@
|
|||
2014-05-05 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||
|
||||
* pandora_console/include/functions_groups.php
|
||||
pandora_console/include/functions_events.php: Fixed bug
|
||||
in event viewer. A user could not be assigned himself as
|
||||
the owner of the event.
|
||||
2014-05-05 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||
|
||||
* pandora_console/include/functions_groups.php
|
||||
pandora_console/include/functions_events.php: Fixed bug
|
||||
in event viewer. A user could not be assigned himself as
|
||||
the owner of the event.
|
||||
|
||||
2014-05-05 Alejandro Gallardo <alejandro.gallardo@artica.es>
|
||||
|
||||
* include/functions_netflow.php: Added an overflow
|
||||
|
|
|
@ -1544,8 +1544,10 @@ function events_page_responses ($event) {
|
|||
foreach($profiles_view_events as $k => $v) {
|
||||
$profiles_view_events[$k] = reset($v);
|
||||
}
|
||||
$users = groups_get_users($event['id_grupo'], array('id_perfil' => $profiles_view_events), true);
|
||||
|
||||
// Juanma (05/05/2014) Fix : Propagate ACL hell!
|
||||
$_user_groups = array_keys(users_get_groups($config['id_user'], 'ER', users_can_manage_group_all()));
|
||||
$users = groups_get_users($_user_groups, array('id_perfil' => $profiles_view_events), true, true);
|
||||
|
||||
foreach($users as $u) {
|
||||
$owners[$u['id_user']] = $u['fullname'];
|
||||
}
|
||||
|
|
|
@ -590,10 +590,11 @@ function groups_get_id ($group_name, $returnAllGroup = false) {
|
|||
* @param int $id_group The group id to look for
|
||||
* @param mixed filter array
|
||||
* @param bool True if users with all permissions in the group are retrieved
|
||||
* @param bool Is id_group an array or not #Fix
|
||||
*
|
||||
* @return array An array with all the users or an empty array
|
||||
*/
|
||||
function groups_get_users ($id_group, $filter = false, $return_user_all = false) {
|
||||
function groups_get_users ($id_group, $filter = false, $return_user_all = false, $_is_array = false) {
|
||||
global $config;
|
||||
|
||||
if (! is_array ($filter))
|
||||
|
@ -602,8 +603,14 @@ function groups_get_users ($id_group, $filter = false, $return_user_all = false)
|
|||
$filter['id_grupo'] = $id_group;
|
||||
|
||||
$result_a = array();
|
||||
if (!is_array($id_group) && !empty($id_group)) {
|
||||
// Juanma (05/05/2014) Fix: Check for number/array id_group variable
|
||||
if ($_is_array && is_array($id_group) && !empty($id_group)) {
|
||||
$result_a = db_get_all_rows_filter ("tusuario_perfil", $filter);
|
||||
} else {
|
||||
if (!is_array($id_group) && !empty($id_group)) {
|
||||
$result_a = db_get_all_rows_filter ("tusuario_perfil", $filter);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$result_b = array();
|
||||
|
|
Loading…
Reference in New Issue