mirror of
https://github.com/wallabag/wallabag.git
synced 2025-10-05 19:31:02 +00:00
Add availability to disable an importer
This commit is contained in:
parent
cad5a24fb6
commit
7e7674a4a6
17 changed files with 332 additions and 3 deletions
|
@ -22,10 +22,14 @@ abstract class WallabagController extends AbstractController
|
|||
*/
|
||||
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()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue