Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-02-03 16:51:51 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-02-03 22:24:27 +0300
commit6d2d36a1982f851aead5acb7a861601e7881ccae (patch)
treecff597c6126f2e6d0fcff1be88d29f98ca5399cb /lib/Controller/MessagesController.php
parent70962a95ac6bf61079976c13380d809ef754ef6a (diff)
Detect missing mailbox cache and block access to messages
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/Controller/MessagesController.php')
-rwxr-xr-xlib/Controller/MessagesController.php13
1 files changed, 2 insertions, 11 deletions
diff --git a/lib/Controller/MessagesController.php b/lib/Controller/MessagesController.php
index 7e075621e..9a6fc82de 100755
--- a/lib/Controller/MessagesController.php
+++ b/lib/Controller/MessagesController.php
@@ -33,6 +33,7 @@ namespace OCA\Mail\Controller;
use Exception;
use OCA\Mail\Contracts\IMailManager;
use OCA\Mail\Contracts\IMailSearch;
+use OCA\Mail\Exception\ClientException;
use OCA\Mail\Exception\ServiceException;
use OCA\Mail\Http\AttachmentDownloadResponse;
use OCA\Mail\Http\HtmlResponse;
@@ -40,7 +41,6 @@ use OCA\Mail\Model\IMAPMessage;
use OCA\Mail\Service\AccountService;
use OCA\Mail\Service\IMailBox;
use OCA\Mail\Service\ItineraryService;
-use OCA\Mail\Service\SyncService;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Db\DoesNotExistException;
use OCP\AppFramework\Http;
@@ -70,9 +70,6 @@ class MessagesController extends Controller {
/** @var ItineraryService */
private $itineraryService;
- /** @var SyncService */
- private $syncService;
-
/** @var string */
private $currentUserId;
@@ -108,7 +105,6 @@ class MessagesController extends Controller {
IMailManager $mailManager,
IMailSearch $mailSearch,
ItineraryService $itineraryService,
- SyncService $syncService,
string $UserId,
$userFolder,
ILogger $logger,
@@ -121,7 +117,6 @@ class MessagesController extends Controller {
$this->mailManager = $mailManager;
$this->mailSearch = $mailSearch;
$this->itineraryService = $itineraryService;
- $this->syncService = $syncService;
$this->currentUserId = $UserId;
$this->userFolder = $userFolder;
$this->logger = $logger;
@@ -141,6 +136,7 @@ class MessagesController extends Controller {
* @param string $filter
*
* @return JSONResponse
+ * @throws ClientException
* @throws ServiceException
*/
public function index(int $accountId, string $folderId, int $cursor = null, string $filter = null): JSONResponse {
@@ -150,11 +146,6 @@ class MessagesController extends Controller {
return new JSONResponse(null, Http::STATUS_FORBIDDEN);
}
- $this->syncService->ensurePopulated(
- $account,
- base64_decode($folderId)
- );
-
$this->logger->debug("loading messages of folder <$folderId>");
return new JSONResponse(