Fixed list of data in report when user have strict_acl, tiquet: #2014
This commit is contained in:
parent
5f32d18f06
commit
581d5e9c5f
|
@ -451,7 +451,7 @@ switch ($action) {
|
|||
|
||||
$reports = reports_get_reports ($filter,
|
||||
array ('name', 'id_report', 'description', 'private',
|
||||
'id_user', 'id_group', 'non_interactive'), $return_all_group, 'RR', $group);
|
||||
'id_user', 'id_group', 'non_interactive'), $return_all_group, 'RR', $group, $strict_user);
|
||||
|
||||
$table->width = '0px';
|
||||
if (sizeof ($reports)) {
|
||||
|
|
|
@ -82,7 +82,7 @@ function reports_get_report ($id_report, $filter = false, $fields = false) {
|
|||
*
|
||||
* @return array An array with all the reports the user can view.
|
||||
*/
|
||||
function reports_get_reports ($filter = false, $fields = false, $returnAllGroup = true, $privileges = 'RR', $group = false) {
|
||||
function reports_get_reports ($filter = false, $fields = false, $returnAllGroup = true, $privileges = 'RR', $group = false, $strict_user) {
|
||||
global $config;
|
||||
|
||||
if (! is_array ($filter))
|
||||
|
@ -110,6 +110,8 @@ function reports_get_reports ($filter = false, $fields = false, $returnAllGroup
|
|||
else {
|
||||
//Recheck in all reports if the user have permissions to see each report.
|
||||
$groups = users_get_groups ($config['id_user'], $privileges, $returnAllGroup);
|
||||
if ($strict_user)
|
||||
$groups = users_get_strict_mode_groups ($config['id_user'], $returnAllGroup)
|
||||
}
|
||||
|
||||
foreach ($all_reports as $report) {
|
||||
|
|
Loading…
Reference in New Issue