mirror of
https://github.com/Karaka-Management/oms-Editor.git
synced 2026-02-13 16:58:44 +00:00
Fix permission condition
This commit is contained in:
parent
49d9b27863
commit
346006f684
|
|
@ -183,8 +183,8 @@ class Controller extends ModuleAbstract implements WebInterface
|
||||||
$doc = EditorDocMapper::get((int) $request->getData('id'));
|
$doc = EditorDocMapper::get((int) $request->getData('id'));
|
||||||
$accountId = $request->getHeader()->getAccount();
|
$accountId = $request->getHeader()->getAccount();
|
||||||
|
|
||||||
if (!$doc->getCreatedBy()->getId() === $accountId
|
if ($doc->getCreatedBy()->getId() !== $accountId
|
||||||
|| !$this->app->accountManager->get($accountId)->hasPermission(
|
&& !$this->app->accountManager->get($accountId)->hasPermission(
|
||||||
PermissionType::READ, 1, $this->app->appName, self::MODULE_ID, PermissionState::DOC, $doc->getId())
|
PermissionType::READ, 1, $this->app->appName, self::MODULE_ID, PermissionState::DOC, $doc->getId())
|
||||||
) {
|
) {
|
||||||
$view->setTemplate('/Web/Backend/Error/403_inline');
|
$view->setTemplate('/Web/Backend/Error/403_inline');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user