Espinoza Guillermo преди 6 години
родител
ревизия
a929fd734f
променени са 1 файла, в които са добавени 4 реда и са изтрити 2 реда
  1. 4 2
      Controller/CRUDController.php

+ 4 - 2
Controller/CRUDController.php

@@ -176,8 +176,10 @@ class CRUDController extends BaseCRUDController
      */
     public function runWorkflowBatchAction($workflow, ProxyQueryInterface $selectedModelQuery)
     {
-        if ($this->admin->isGranted('EDIT') === false || $this->admin->isGranted('DELETE') === false) {
-            throw new AccessDeniedException();
+        if ($this->isGranted('ROLE_SUPER_ADMIN') === false && 
+            $this->admin->isGranted('EDIT') === false && 
+            $this->admin->isGranted('DELETE') === false) {
+                throw $this->createAccessDeniedException('You cannot access this page!');
         }
         $session = $this->get('session')->getFlashBag();
         $translator = $this->get('translator');