1 Commits

Author SHA1 Message Date
Sebastian 4d96ceaad5 chore: implement js test suites
Build Test / test (pull_request) Successful in 1m4s
JS Unit Tests / test (pull_request) Successful in 55s
PHP Integration Tests / Integration Tests (pull_request) Successful in 2m13s
PHP Unit Tests / test (pull_request) Successful in 2m17s
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
2026-07-24 00:13:52 -04:00
4 changed files with 584 additions and 151 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
services:
mongo:
image: mongo:8
image: mongo:7
options: >-
--health-cmd "mongosh --quiet --eval \"db.adminCommand('ping')\""
--health-interval 5s
+7 -7
View File
@@ -14,8 +14,8 @@ use KTXC\Http\Response\JsonResponse;
use KTXC\Http\Response\Response;
use KTXC\Http\Response\StreamedNdJsonResponse;
use KTXC\Http\Response\StreamedResponse;
use KTXC\Context\IdentityContextInterface;
use KTXC\Context\TenantContextInterface;
use KTXC\SessionIdentity;
use KTXC\SessionTenant;
use KTXF\Controller\ControllerAbstract;
use KTXF\Json\JsonSerializable;
use KTXF\Resource\Identifier\CollectionIdentifier;
@@ -51,8 +51,8 @@ class DefaultController extends ControllerAbstract {
private const ERR_INVALID_DATA = 'Invalid parameter: data must be an array';
public function __construct(
private readonly TenantContextInterface $tenantContext,
private readonly IdentityContextInterface $identityContext,
private readonly SessionTenant $tenantIdentity,
private readonly SessionIdentity $userIdentity,
private Manager $manager,
private readonly LoggerInterface $logger
) {}
@@ -80,13 +80,13 @@ class DefaultController extends ControllerAbstract {
): Response {
// authorize request
$tenantId = $this->tenantContext->identifier();
$userId = $this->identityContext->identifier();
$tenantId = $this->tenantIdentity->identifier();
$userId = $this->userIdentity->identifier();
// acting-user override: only the reserved system context is permitted,
// gated on the system mail management permission
if ($user !== null && $user !== $userId) {
if ($user !== ProviderBaseInterface::USER_SYSTEM || !$this->identityContext->hasPermission('mail_manager.system')) {
if ($user !== ProviderBaseInterface::USER_SYSTEM || !$this->userIdentity->hasPermission('mail_manager.system')) {
return new JsonResponse([
'version' => $version,
'transaction' => $transaction,
+574 -141
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -18,9 +18,9 @@
"test:coverage": "vitest run --coverage --config tests/js/vitest.config.ts"
},
"dependencies": {
"pinia": "^4.0.0",
"pinia": "^3.0.0",
"vue": "^3.5.18",
"vue-router": "^5.2.0",
"vue-router": "^5.0.0",
"vuetify": "^4.0.0"
},
"devDependencies": {