forked from wallabag/wallabag
Add availability to disable an importer
This commit is contained in:
@ -20,10 +20,14 @@ abstract class BrowserController extends AbstractController
|
||||
#[IsGranted('IMPORT_ENTRIES')]
|
||||
public function indexAction(Request $request, TranslatorInterface $translator)
|
||||
{
|
||||
$wallabag = $this->getImportService();
|
||||
if (!$this->isGranted('USE_IMPORTER', $wallabag)) {
|
||||
throw $this->createAccessDeniedException('You can not access this importer.');
|
||||
}
|
||||
|
||||
$form = $this->createForm(UploadImportType::class);
|
||||
$form->handleRequest($request);
|
||||
|
||||
$wallabag = $this->getImportService();
|
||||
$wallabag->setUser($this->getUser());
|
||||
|
||||
if ($form->isSubmitted() && $form->isValid()) {
|
||||
|
||||
Reference in New Issue
Block a user