- Added a new CSRF token verification Middleware.
- Added a new ActionLog middleware to catch every modifying request and save the changes made and the user who did. - Added a new RequestLog to catch every request made whenever required.
This commit is contained in:
1 parent
9571c6a462
commit
4b86ac9e82
42 files changed
+1331
-148
No files matched your search
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace Lean\Api\Factory\FormFactories;
|
||||
|
||||
use Picea\Ui\Method\FormContextInterface;
|
||||
use Picea\Ui\Method\FormInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Ulmus\Entity\EntityInterface;
|
||||
use Lean\Api\{Factory, Form, Entity, Lib};
|
||||
|
||||
trait DebugTrait{
|
||||
|
||||
public function errorSave(EntityInterface|Entity\Error $entity): FormInterface
|
||||
{
|
||||
return new Form\Debug\ErrorSave($this->languageHandler, $this->messageFactory, $entity);
|
||||
}
|
||||
|
||||
public function errorSaveContext(? ServerRequestInterface $request = null, ? string $formName = null): FormContextInterface
|
||||
{
|
||||
return new Form\Debug\ErrorContext($request ?: $this->request, $formName);
|
||||
}
|
||||
|
||||
public function errorDelete(EntityInterface|Entity\Error $entity): FormInterface
|
||||
{
|
||||
return new Form\Debug\ErrorDelete($this->languageHandler, $this->messageFactory, $entity);
|
||||
}
|
||||
|
||||
public function errorDeleteContext(?ServerRequestInterface $request = null, ?string $formName = null): FormContextInterface
|
||||
{
|
||||
return new Lib\FormContext($request, $formName);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user