add ip support for auditor

This commit is contained in:
Dennis Eichhorn 2020-05-31 22:49:58 +02:00
parent ce78b29b94
commit 16556f66ad
2 changed files with 5 additions and 5 deletions

View File

@ -86,7 +86,7 @@ final class ApiController extends Controller
} }
$doc = $this->createDocFromRequest($request); $doc = $this->createDocFromRequest($request);
$this->createModel($request->getHeader()->getAccount(), $doc, EditorDocMapper::class, 'doc'); $this->createModel($request->getHeader()->getAccount(), $doc, EditorDocMapper::class, 'doc', $request->getOrigin());
$this->fillJsonResponse($request, $response, NotificationLevel::OK, 'Document', 'Document successfully created', $doc); $this->fillJsonResponse($request, $response, NotificationLevel::OK, 'Document', 'Document successfully created', $doc);
} }
@ -134,7 +134,7 @@ final class ApiController extends Controller
/** @var \Modules\Editor\Models\EditorDoc $old */ /** @var \Modules\Editor\Models\EditorDoc $old */
$old = clone EditorDocMapper::get((int) $request->getData('id')); $old = clone EditorDocMapper::get((int) $request->getData('id'));
$new = $this->updateEditorFromRequest($request); $new = $this->updateEditorFromRequest($request);
$this->updateModel($request->getHeader()->getAccount(), $old, $new, EditorDocMapper::class, 'doc'); $this->updateModel($request->getHeader()->getAccount(), $old, $new, EditorDocMapper::class, 'doc', $request->getOrigin());
$this->fillJsonResponse($request, $response, NotificationLevel::OK, 'Document', 'Document successfully updated', $new); $this->fillJsonResponse($request, $response, NotificationLevel::OK, 'Document', 'Document successfully updated', $new);
} }
@ -195,7 +195,7 @@ final class ApiController extends Controller
{ {
/** @var \Modules\Editor\Models\EditorDoc $doc */ /** @var \Modules\Editor\Models\EditorDoc $doc */
$doc = EditorDocMapper::get((int) $request->getData('id')); $doc = EditorDocMapper::get((int) $request->getData('id'));
$this->deleteModel($request->getHeader()->getAccount(), $doc, EditorDocMapper::class, 'doc'); $this->deleteModel($request->getHeader()->getAccount(), $doc, EditorDocMapper::class, 'doc', $request->getOrigin());
$this->fillJsonResponse($request, $response, NotificationLevel::OK, 'Document', 'Document successfully deleted', $doc); $this->fillJsonResponse($request, $response, NotificationLevel::OK, 'Document', 'Document successfully deleted', $doc);
} }
} }

View File

@ -49,8 +49,8 @@ echo $this->getData('nav')->render(); ?>
<?php endif; ?> <?php endif; ?>
</table> </table>
<div class="portlet-foot"> <div class="portlet-foot">
<a class="button" href="<?= UriFactory::build($previous); ?>"><?= $this->getHtml('Previous', '0', '0'); ?></a> <a tabindex="0" class="button" href="<?= UriFactory::build($previous); ?>"><?= $this->getHtml('Previous', '0', '0'); ?></a>
<a class="button" href="<?= UriFactory::build($next); ?>"><?= $this->getHtml('Next', '0', '0'); ?></a> <a tabindex="0" class="button" href="<?= UriFactory::build($next); ?>"><?= $this->getHtml('Next', '0', '0'); ?></a>
</div> </div>
</div> </div>
</div> </div>