bug fixes and permission tests

This commit is contained in:
Dennis Eichhorn 2022-01-22 21:56:01 +01:00
parent 67ecfeffca
commit 38f1cce2cd
2 changed files with 13 additions and 2 deletions

View File

@ -211,7 +211,18 @@ final class BackendController extends Controller
{
$view = new View($this->app->l11nManager, $request, $response);
$card = KanbanCardMapper::get()->where('id', (int) $request->getData('id'))->execute();
$card = KanbanCardMapper::get()
->with('tags')
->with('tags/title')
->with('media')
->with('createdBy')
->with('comments')
->with('comments/media')
->with('comments/createdBy')
->where('id', (int) $request->getData('id'))
->where('tags/title/language', $response->getLanguage())
->execute();
$accountId = $request->header->account;
if ($card->createdBy->getId() !== $accountId

View File

@ -20,7 +20,7 @@ $columns = $board->getColumns();
?>
<div class="row">
<?php $i = 0; foreach ($columns as $column) : $i++; $cards = $column->getCards(); ?>
<div id="kanban-column-<?= $i; ?>" class="col-xs-12 col-md-6 col-lg-3 box kanban-column" draggable="true">
<div id="kanban-column-<?= $i; ?>" class="col-xs-12 col-md-6 col-lg-3 box kanban-column">
<header><?= $this->printHtml($column->name); ?></header>
<?php $j = 0; foreach ($cards as $card) : $j++;
$url = \phpOMS\Uri\UriFactory::build('{/prefix}kanban/card?{?}&id=' . $card->getId());