BUGFIX: Only list reports in admin/reports that you can actually view (from r95885)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@98177 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2010-02-04 04:50:47 +00:00
parent a5753ad5ef
commit b50917db00

View File

@ -66,7 +66,11 @@ class ReportAdmin extends LeftAndMain {
* @return DataObjectSet
*/
public function Reports() {
return new DataObjectSet(SSReport::get_reports('ReportAdmin'));
$output = new DataObjectSet();
foreach(SSReport::get_reports('ReportAdmin') as $report) {
if($report->canView()) $output->push($report);
}
return $output;
}
/**