chore: import DH V2 D5.6.4 production baseline

This commit is contained in:
DH V2
2026-09-05 10:12:35 -03:00
commit 82213e72f5
757 changed files with 84218 additions and 0 deletions
@@ -0,0 +1,17 @@
import 'reflect-metadata';
import assert from 'node:assert/strict';
import test from 'node:test';
import { AssetHistoryController } from '../../src/asset-master/asset-history.controller';
import { REQUIRED_PERMISSIONS_KEY } from '../../src/authorization/decorators/require-permissions.decorator';
function permissionFor(method: string): string[] {
const controller = AssetHistoryController.prototype;
const handler = controller[method as keyof typeof controller];
return Reflect.getMetadata(REQUIRED_PERMISSIONS_KEY, handler) as string[];
}
test('all asset history endpoints require the dedicated permission', () => {
assert.deepEqual(permissionFor('list'), ['assets.read_history']);
assert.deepEqual(permissionFor('listForAsset'), ['assets.read_history']);
assert.deepEqual(permissionFor('getVersion'), ['assets.read_history']);
});