From 091913de60d2bebecec5bae98e44dd8ff776e895 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 16 Sep 2017 11:47:52 +0200 Subject: [PATCH] Fix permission condition --- Controller.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Controller.php b/Controller.php index 87bf024..b527a92 100644 --- a/Controller.php +++ b/Controller.php @@ -150,8 +150,8 @@ class Controller extends ModuleAbstract implements WebInterface $article = NewsArticleMapper::get((int) $request->getData('id')); $accountId = $request->getHeader()->getAccount(); - if (!$article->getCreatedBy()->getId() === $accountId - || !$this->app->accountManager->get($accountId)->hasPermission( + if ($article->getCreatedBy()->getId() !== $accountId + && !$this->app->accountManager->get($accountId)->hasPermission( PermissionType::READ, 1, $this->app->appName, self::MODULE_ID, PermissionState::ARTICLE, $article->getId()) ) { $view->setTemplate('/Web/Backend/Error/403_inline');