fase(25-26): keyboard shortcuts, mobile responsive, enterprise SSO/audit
- Phase 25.4: N shortcut for new exploration on dashboard (react-hotkeys-hook) - Phase 25.5: overflow-x-auto on tables, responsive padding (p-4 md:p-6) - Phase 26: SAML/OIDC/LDAP providers (build-fixed), TOTP/MFA service - Phase 26: KyselySSOConfigRepository + KyselyTOTPRepository - Phase 26: SSO HTTP controller (config CRUD + MFA setup/verify/disable) - Phase 26: Audit module index.ts + SSO module index.ts - Phase 26: Session management endpoints (findByUserId, deleteById, list/revoke) - Phase 26: SSO and audit routes feature-gated (auth:sso, audit:logs) - Phase 26: Frontend SSOSection (SAML/OIDC/LDAP config + TOTP setup) - Phase 26: Frontend SessionsSection (list/revoke active sessions) - Phase 26: Settings navigation updated with SSO & Sessions sections Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
39
dist/modules/audit/infrastructure/http/AuditController.js
vendored
Normal file
39
dist/modules/audit/infrastructure/http/AuditController.js
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.createAuditRouter = createAuditRouter;
|
||||
const express_1 = require("express");
|
||||
function createAuditRouter(repo) {
|
||||
const router = (0, express_1.Router)();
|
||||
// GET /api/audit — list audit logs (enterprise only)
|
||||
router.get('/', async (req, res, next) => {
|
||||
try {
|
||||
const filters = {
|
||||
userId: req.query['userId'],
|
||||
organizationId: req.query['organizationId'],
|
||||
action: req.query['action'],
|
||||
resource: req.query['resource'],
|
||||
limit: req.query['limit'] ? Number(req.query['limit']) : 100,
|
||||
};
|
||||
if (req.query['from'])
|
||||
filters.from = new Date(req.query['from']);
|
||||
if (req.query['to'])
|
||||
filters.to = new Date(req.query['to']);
|
||||
const logs = await repo.findAll(filters);
|
||||
res.json(logs.map((l) => ({
|
||||
id: l.id.toString(),
|
||||
userId: l.userId,
|
||||
organizationId: l.organizationId,
|
||||
action: l.action,
|
||||
resource: l.resource,
|
||||
resourceId: l.resourceId,
|
||||
ipAddress: l.ipAddress,
|
||||
details: l.details,
|
||||
occurredAt: l.occurredAt.toISOString(),
|
||||
})));
|
||||
}
|
||||
catch (err) {
|
||||
next(err);
|
||||
}
|
||||
});
|
||||
return router;
|
||||
}
|
||||
Reference in New Issue
Block a user