improve permission checks for report access (#2658)

This commit is contained in:
Kevin Papst
2021-07-13 06:21:31 +02:00
committed by GitHub
parent a1f90ffaba
commit 7661d43327
3 changed files with 31 additions and 23 deletions

View File

@@ -51,9 +51,11 @@ final class ReportingService
}
if ($this->security->isGranted('budget_project')) {
$event->addReport(new Report('project_view', 'report_project_view', 'report_project_view', 'project'));
if ($this->security->isGranted('details_project')) {
$event->addReport(new Report('project_details', 'report_project_details', 'report_project_details', 'project'));
}
}
if ($this->security->isGranted('details_project') || $this->security->isGranted('details_teamlead_project') || $this->security->isGranted('details_team_project')) {
$event->addReport(new Report('project_details', 'report_project_details', 'report_project_details', 'project'));
}
if ($this->security->isGranted('budget_project')) {
$event->addReport(new Report('inactive_projects', 'report_project_inactive', 'report_inactive_project', 'project'));
}