mirror of
https://github.com/Karaka-Management/oms-News.git
synced 2026-01-29 16:48:40 +00:00
Fix permission condition
This commit is contained in:
parent
515a2ab746
commit
091913de60
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user