diff options
Diffstat (limited to 'src/Wallabag/ImportBundle')
-rw-r--r-- | src/Wallabag/ImportBundle/Controller/ImportController.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Wallabag/ImportBundle/Controller/ImportController.php b/src/Wallabag/ImportBundle/Controller/ImportController.php index d670746c..ea4f7d7b 100644 --- a/src/Wallabag/ImportBundle/Controller/ImportController.php +++ b/src/Wallabag/ImportBundle/Controller/ImportController.php | |||
@@ -19,12 +19,20 @@ class ImportController extends Controller | |||
19 | 19 | ||
20 | /** | 20 | /** |
21 | * Display how many messages are queue (both in Redis and RabbitMQ). | 21 | * Display how many messages are queue (both in Redis and RabbitMQ). |
22 | * Only for admins. | ||
22 | */ | 23 | */ |
23 | public function checkQueueAction() | 24 | public function checkQueueAction() |
24 | { | 25 | { |
25 | $nbRedisMessages = null; | 26 | $nbRedisMessages = null; |
26 | $nbRabbitMessages = null; | 27 | $nbRabbitMessages = null; |
27 | 28 | ||
29 | if (!$this->get('security.authorization_checker')->isGranted('ROLE_SUPER_ADMIN')) { | ||
30 | return $this->render('WallabagImportBundle:Import:check_queue.html.twig', [ | ||
31 | 'nbRedisMessages' => $nbRedisMessages, | ||
32 | 'nbRabbitMessages' => $nbRabbitMessages, | ||
33 | ]); | ||
34 | } | ||
35 | |||
28 | if ($this->get('craue_config')->get('import_with_rabbitmq')) { | 36 | if ($this->get('craue_config')->get('import_with_rabbitmq')) { |
29 | $nbRabbitMessages = $this->getTotalMessageInRabbitQueue('pocket') | 37 | $nbRabbitMessages = $this->getTotalMessageInRabbitQueue('pocket') |
30 | + $this->getTotalMessageInRabbitQueue('readability') | 38 | + $this->getTotalMessageInRabbitQueue('readability') |