take into account all reachble centers by default for authorization

This commit is contained in:
2016-01-26 11:24:36 +01:00
parent de27c50a5a
commit 630be1d3d2
2 changed files with 22 additions and 13 deletions

View File

@@ -75,9 +75,8 @@ class ExportController extends Controller
// first check for ACL
$exportManager = $this->get('chill.main.export_manager');
$export = $exportManager->getExport($alias);
$centers = $this->get('chill.main.security.authorization.helper')
->getReachableCenters($this->getUser(), $export->requiredRole());
if ($exportManager->isGrantedForElement($export, $centers) === FALSE) {
if ($exportManager->isGrantedForElement($export) === FALSE) {
throw $this->createAccessDeniedException('The user does not have access to this export');
}