mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-29 10:05:03 +00:00
Refactor SavedExport permissions and voter logic
Revised SavedExportVoter to improve consistency and streamline permission checks. Updated tests, controller logic, and templates to align with new voter structure and attributes. Fixed typos in permission constants and added checks for delete/edit actions in the UI.
This commit is contained in:
@@ -509,8 +509,8 @@ class ExportController extends AbstractController
|
||||
default => $this->savedExportOrExportGenerationRepository->findById($savedExportId),
|
||||
};
|
||||
|
||||
if (null !== $savedExport && !$this->security->isGranted(SavedExportVoter::EDIT, $savedExport)) {
|
||||
throw new AccessDeniedHttpException('saved export edition not allowed');
|
||||
if (null !== $savedExport && !$this->security->isGranted(SavedExportVoter::GENERATE, $savedExport)) {
|
||||
throw new AccessDeniedHttpException('saved export generation not allowed');
|
||||
}
|
||||
|
||||
return $savedExport;
|
||||
|
Reference in New Issue
Block a user