forked from wallabag/wallabag
Only display message in queue for admin
Instead of for EVERYONE
This commit is contained in:
@ -19,12 +19,20 @@ class ImportController extends Controller
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Display how many messages are queue (both in Redis and RabbitMQ).
|
* Display how many messages are queue (both in Redis and RabbitMQ).
|
||||||
|
* Only for admins.
|
||||||
*/
|
*/
|
||||||
public function checkQueueAction()
|
public function checkQueueAction()
|
||||||
{
|
{
|
||||||
$nbRedisMessages = null;
|
$nbRedisMessages = null;
|
||||||
$nbRabbitMessages = null;
|
$nbRabbitMessages = null;
|
||||||
|
|
||||||
|
if (!$this->get('security.authorization_checker')->isGranted('ROLE_SUPER_ADMIN')) {
|
||||||
|
return $this->render('WallabagImportBundle:Import:check_queue.html.twig', [
|
||||||
|
'nbRedisMessages' => $nbRedisMessages,
|
||||||
|
'nbRabbitMessages' => $nbRabbitMessages,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
if ($this->get('craue_config')->get('import_with_rabbitmq')) {
|
if ($this->get('craue_config')->get('import_with_rabbitmq')) {
|
||||||
$nbRabbitMessages = $this->getTotalMessageInRabbitQueue('pocket')
|
$nbRabbitMessages = $this->getTotalMessageInRabbitQueue('pocket')
|
||||||
+ $this->getTotalMessageInRabbitQueue('readability')
|
+ $this->getTotalMessageInRabbitQueue('readability')
|
||||||
|
|||||||
Reference in New Issue
Block a user