mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 06:05:56 +00:00
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:
parent
a5753ad5ef
commit
b50917db00
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user