@kernhq/module-hr 0.16.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/contract/index.d.ts +1 -0
- package/dist/contract/index.d.ts.map +1 -1
- package/dist/contract/index.js +1 -0
- package/dist/contract/index.js.map +1 -1
- package/dist/contract/models.d.ts +1 -0
- package/dist/contract/models.d.ts.map +1 -1
- package/dist/contract/models.js +15 -0
- package/dist/contract/models.js.map +1 -1
- package/dist/contract/permissions.d.ts +8 -0
- package/dist/contract/permissions.d.ts.map +1 -1
- package/dist/contract/permissions.js +20 -0
- package/dist/contract/permissions.js.map +1 -1
- package/dist/contract/privacy.d.ts +860 -0
- package/dist/contract/privacy.d.ts.map +1 -0
- package/dist/contract/privacy.js +412 -0
- package/dist/contract/privacy.js.map +1 -0
- package/dist/contract/router.d.ts +815 -0
- package/dist/contract/router.d.ts.map +1 -1
- package/dist/contract/router.js +105 -0
- package/dist/contract/router.js.map +1 -1
- package/dist/server/router.d.ts +876 -0
- package/dist/server/router.d.ts.map +1 -1
- package/dist/server/router.js +312 -2
- package/dist/server/router.js.map +1 -1
- package/dist/server/schema.d.ts +397 -1
- package/dist/server/schema.d.ts.map +1 -1
- package/dist/server/schema.js +109 -0
- package/dist/server/schema.js.map +1 -1
- package/dist/server/services/audit.d.ts +249 -0
- package/dist/server/services/audit.d.ts.map +1 -0
- package/dist/server/services/audit.js +230 -0
- package/dist/server/services/audit.js.map +1 -0
- package/dist/server/services/people.d.ts +53 -1
- package/dist/server/services/people.d.ts.map +1 -1
- package/dist/server/services/people.js +74 -1
- package/dist/server/services/people.js.map +1 -1
- package/dist/server/services/privacy.d.ts +514 -0
- package/dist/server/services/privacy.d.ts.map +1 -0
- package/dist/server/services/privacy.js +972 -0
- package/dist/server/services/privacy.js.map +1 -0
- package/migrations/0011_privacy.sql +77 -0
- package/migrations/meta/0011_snapshot.json +4450 -0
- package/migrations/meta/_journal.json +7 -0
- package/package.json +1 -1
- package/src/contract/index.ts +1 -0
- package/src/contract/models.ts +15 -0
- package/src/contract/permissions.ts +22 -0
- package/src/contract/privacy.ts +452 -0
- package/src/contract/router.ts +121 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../src/server/router.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,MAAM,EACX,KAAK,cAAc,EAGnB,KAAK,EAAE,EAGR,MAAM,gBAAgB,CAAA;AAgEvB,OAAO,EAAmB,KAAK,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAE5D,OAAO,EAAE,aAAa,EAA2B,MAAM,sBAAsB,CAAA;AAG7E,OAAO,EAAwB,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAmK5E;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE;IAC/B,OAAO,EAAE,cAAc,CAAA;IACvB,MAAM,EAAE,aAAa,CAAA;IACrB,UAAU,EAAE,iBAAiB,CAAA;CAC9B;sBAGgC,EAAE,eAAe,MAAM,aAAa,MAAM;;;;;;;;;;;;;;;;;;;;;mBAkBnE,EAAE,eACO,MAAM,YACT,MAAM,SACT;QACL,WAAW,EAAE,MAAM,CAAA;QACnB,QAAQ,EAAE,MAAM,CAAA;QAChB,MAAM,EAAE,MAAM,CAAA;QACd,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,WAAW,CAAA;QAC3C,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,WAAW,CAAA;QACzC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KACtB;;;;;;;;;;;;kBAE6B,MAAM;qBAAW,MAAM;;;wBAkHtB,EAAE,eAAe,MAAM,kBAAkB,MAAM,WAAW,MAAM,GAAG,IAAI;8BAmEjE,EAAE,eAAe,MAAM,oBAAoB,MAAM;wBAdvD,EAAE,eAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAozIxC"}
|
package/dist/server/router.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { KernError, requires, requiresCapability, uuidv7, workspaceScoped, } from '@kernhq/kernel';
|
|
1
|
+
import { KernError, packageVersion, requires, requiresCapability, uuidv7, workspaceScoped, } from '@kernhq/kernel';
|
|
2
2
|
import { implement } from '@orpc/server';
|
|
3
3
|
import { and, asc, count, desc, eq, getTableColumns, gte, ilike, inArray, isNull, lte, or, sql, } from 'drizzle-orm';
|
|
4
4
|
import { HrSettings, hrContract, hrEvents, MODULE_ID } from '../contract/index.js';
|
|
@@ -10,12 +10,16 @@ import { approvalChains, approvalDecisions, approvalRequests, approvalSteps, att
|
|
|
10
10
|
import { forViewer, HrAccessService, seesRecordOf, visibleSet } from './services/access.js';
|
|
11
11
|
import { ApprovalService } from './services/approvals.js';
|
|
12
12
|
import { AttendanceService } from './services/attendance.js';
|
|
13
|
+
import { accessLogSort, HrAuditService } from './services/audit.js';
|
|
13
14
|
import { inForceOn, todayIso } from './services/db.js';
|
|
14
15
|
import { LedgerService, MINUTES_PER_DAY, yearOf } from './services/ledger.js';
|
|
15
16
|
import { PeopleService } from './services/people.js';
|
|
16
17
|
import { hashConfig, PolicyService } from './services/policies.js';
|
|
18
|
+
import { closingBalance, PrivacyService, RETENTION_CLASSES, stripSensitiveCustom, } from './services/privacy.js';
|
|
17
19
|
import { DEFAULT_WORKING_WEEK, ResolveService } from './services/resolve.js';
|
|
18
20
|
const os = implement(hrContract).$context();
|
|
21
|
+
/** Shared so the ordinary case — no sensitive custom fields defined — allocates nothing per page. */
|
|
22
|
+
const NO_HIDDEN_FIELDS = new Set();
|
|
19
23
|
const encodeCursor = (key, id) => Buffer.from(JSON.stringify([key, id]), 'utf8').toString('base64url');
|
|
20
24
|
function decodeCursor(raw) {
|
|
21
25
|
if (!raw)
|
|
@@ -439,6 +443,8 @@ export function implement_(kernel) {
|
|
|
439
443
|
* this one is built for no actor — the per-request actor arrives at `decide` below.
|
|
440
444
|
*/
|
|
441
445
|
const approvals = new ApprovalService(kernel, subjects.appliersFor(null));
|
|
446
|
+
const privacy = new PrivacyService();
|
|
447
|
+
const audit = new HrAuditService(kernel, access);
|
|
442
448
|
const db = kernel.database;
|
|
443
449
|
const settingsOf = (workspaceId) => kernel.settings.module(workspaceId, MODULE_ID, HrSettings);
|
|
444
450
|
const changed = (workspaceId, entity, id, op) => kernel.realtime.change(workspaceId, { module: MODULE_ID, entity, id, op });
|
|
@@ -515,9 +521,12 @@ export function implement_(kernel) {
|
|
|
515
521
|
.where(and(eq(officeAssignments.workspaceId, input.workspaceId), inArray(officeAssignments.personId, rows.map((r) => r.id)), eq(officeAssignments.isPrimary, true), isNull(officeAssignments.effectiveTo)))
|
|
516
522
|
: [];
|
|
517
523
|
const officeBy = new Map(assignments.map((a) => [a.personId, a]));
|
|
524
|
+
const hidden = await sensitiveCustomKeys(tx, input.workspaceId, context.principal);
|
|
525
|
+
const own = hidden.size ? await access.personIdOf(tx, input.workspaceId, context.principal) : null;
|
|
518
526
|
return {
|
|
519
527
|
items: rows.map((r) => forViewer({
|
|
520
528
|
...PeopleService.toPerson(r),
|
|
529
|
+
custom: r.id === own ? (r.custom ?? {}) : stripSensitiveCustom(r.custom ?? {}, hidden),
|
|
521
530
|
// Spreading into a fresh literal drops the branded WorkspaceId that flowed through
|
|
522
531
|
// `toPerson`, so it is restored rather than widened to `string`.
|
|
523
532
|
workspaceId: r.workspaceId,
|
|
@@ -537,7 +546,13 @@ export function implement_(kernel) {
|
|
|
537
546
|
*/
|
|
538
547
|
get: scoped.people.get.use(requires('hr.person.view')).handler(({ input, context }) => db.withWorkspace(input.workspaceId, async (tx) => {
|
|
539
548
|
const visible = visibleSet(await access.visiblePersonIds(tx, input.workspaceId, context.principal));
|
|
540
|
-
|
|
549
|
+
const person = PeopleService.toPerson(await svc.load(tx, input.workspaceId, input.personId));
|
|
550
|
+
const hidden = await sensitiveCustomKeys(tx, input.workspaceId, context.principal);
|
|
551
|
+
const own = hidden.size ? await access.personIdOf(tx, input.workspaceId, context.principal) : null;
|
|
552
|
+
return forViewer({
|
|
553
|
+
...person,
|
|
554
|
+
custom: person.id === own ? person.custom : stripSensitiveCustom(person.custom, hidden),
|
|
555
|
+
}, visible);
|
|
541
556
|
})),
|
|
542
557
|
/**
|
|
543
558
|
* No permission check: everybody may read their own record, and a permission nobody can lack
|
|
@@ -3168,10 +3183,305 @@ export function implement_(kernel) {
|
|
|
3168
3183
|
return { ok: true };
|
|
3169
3184
|
}),
|
|
3170
3185
|
},
|
|
3186
|
+
// ================================================================= privacy
|
|
3187
|
+
/**
|
|
3188
|
+
* Subject access, erasure and retention.
|
|
3189
|
+
*
|
|
3190
|
+
* `hr.privacy.manage` gates all of it except reading your own access log, and it is granted to
|
|
3191
|
+
* nobody by default — so on a fresh workspace only an owner, who passes every check, can reach
|
|
3192
|
+
* any of this. That is the intended starting position: whether anybody below an owner may export
|
|
3193
|
+
* or erase a colleague is a decision the workspace makes deliberately, in the role editor.
|
|
3194
|
+
*/
|
|
3195
|
+
privacy: {
|
|
3196
|
+
/**
|
|
3197
|
+
* Everything HR holds about one person.
|
|
3198
|
+
*
|
|
3199
|
+
* Two transactions rather than one, and on purpose. `PeopleService.readSensitive` opens its
|
|
3200
|
+
* own so the decrypt and the `sensitive_access_log` row it writes are atomic with each other —
|
|
3201
|
+
* that atomicity is the point of the log and it must not be widened into a transaction that
|
|
3202
|
+
* also holds several thousand rows of punches open. The bundle's own reads then run in a
|
|
3203
|
+
* second transaction. The consequence is that the two halves are a moment apart, which for a
|
|
3204
|
+
* subject-access snapshot is not a property anybody depends on.
|
|
3205
|
+
*
|
|
3206
|
+
* The access log is read **after** the export's own row is written, so a subject's bundle
|
|
3207
|
+
* always contains the read that produced it. A bundle that could not account for its own
|
|
3208
|
+
* existence is the first hole somebody would find in it.
|
|
3209
|
+
*/
|
|
3210
|
+
subjectAccess: scoped.privacy.subjectAccess
|
|
3211
|
+
.use(requires('hr.privacy.manage'))
|
|
3212
|
+
.handler(async ({ input, context }) => {
|
|
3213
|
+
const { workspaceId, personId } = input;
|
|
3214
|
+
// Before anything else: this both proves the person exists and records the disclosure.
|
|
3215
|
+
// Refusing here means nothing was decrypted and nothing was assembled.
|
|
3216
|
+
const sensitive = await svc.readSensitive({
|
|
3217
|
+
workspaceId,
|
|
3218
|
+
personId,
|
|
3219
|
+
principal: context.principal,
|
|
3220
|
+
via: 'export',
|
|
3221
|
+
purpose: input.purpose ?? null,
|
|
3222
|
+
});
|
|
3223
|
+
return db.withWorkspace(workspaceId, async (tx) => {
|
|
3224
|
+
const person = await svc.load(tx, workspaceId, personId);
|
|
3225
|
+
const data = await privacy.subjectAccess(tx, workspaceId, personId);
|
|
3226
|
+
// Resolved here rather than left to the client, and included whatever the
|
|
3227
|
+
// `leave_accrual` capability says: "why is my balance this number" is the commonest
|
|
3228
|
+
// follow-up to a subject-access request, and it is the subject's own data either way.
|
|
3229
|
+
const kinds = ['accrual', 'carry_forward', 'overtime', 'rounding', 'working_time'];
|
|
3230
|
+
const policiesInForce = [];
|
|
3231
|
+
for (const kind of kinds)
|
|
3232
|
+
policiesInForce.push(await policySvc.forPerson(tx, workspaceId, personId, kind, todayIso()));
|
|
3233
|
+
const decisionsOf = (stepId) => data.approvals.stepDecisions
|
|
3234
|
+
.filter((d) => d.stepId === stepId)
|
|
3235
|
+
.map((d) => ({ ...d, decision: d.decision, at: d.at.toISOString() }));
|
|
3236
|
+
const toStep = (s) => ({
|
|
3237
|
+
...s,
|
|
3238
|
+
mode: s.mode,
|
|
3239
|
+
status: s.status,
|
|
3240
|
+
dueAt: s.dueAt?.toISOString() ?? null,
|
|
3241
|
+
escalatedAt: s.escalatedAt?.toISOString() ?? null,
|
|
3242
|
+
decisions: decisionsOf(s.id),
|
|
3243
|
+
});
|
|
3244
|
+
return {
|
|
3245
|
+
manifest: {
|
|
3246
|
+
workspaceId,
|
|
3247
|
+
personId,
|
|
3248
|
+
generatedAt: new Date().toISOString(),
|
|
3249
|
+
generatedBy: context.principal.userId ?? null,
|
|
3250
|
+
moduleVersion: packageVersion(import.meta.url),
|
|
3251
|
+
truncated: data.truncated,
|
|
3252
|
+
// Stated rather than left to be noticed. HR holds the metadata and the file id for
|
|
3253
|
+
// every document; the bytes live in core's storage and `core.files.get` signs one
|
|
3254
|
+
// download at a time, so a module cannot put them in a bundle. Naming the omission
|
|
3255
|
+
// is the difference between an incomplete export and a dishonest one.
|
|
3256
|
+
excluded: [{ section: 'documents.contents', reason: 'fileContentsNotExportable' }],
|
|
3257
|
+
},
|
|
3258
|
+
// The whole row, never `forViewer`: the four personnel fields it withholds from a
|
|
3259
|
+
// reader are the subject's own.
|
|
3260
|
+
person: PeopleService.toPerson(person),
|
|
3261
|
+
sensitive,
|
|
3262
|
+
employment: data.employment.map(PeopleService.toEmployment),
|
|
3263
|
+
offices: data.offices.map((r) => ({ ...r, createdAt: r.createdAt.toISOString() })),
|
|
3264
|
+
history: data.history.map((r) => ({
|
|
3265
|
+
id: r.id,
|
|
3266
|
+
field: r.field,
|
|
3267
|
+
from: r.from ?? null,
|
|
3268
|
+
to: r.to ?? null,
|
|
3269
|
+
at: r.at.toISOString(),
|
|
3270
|
+
actorId: r.actorId,
|
|
3271
|
+
source: r.source,
|
|
3272
|
+
})),
|
|
3273
|
+
documents: data.documents.map((r) => ({ ...r, createdAt: r.createdAt.toISOString() })),
|
|
3274
|
+
leave: {
|
|
3275
|
+
types: data.leave.types.map(toLeaveType),
|
|
3276
|
+
requests: data.leave.requests.map(toLeaveRequest),
|
|
3277
|
+
days: data.leave.days.map((r) => ({
|
|
3278
|
+
id: r.id,
|
|
3279
|
+
requestId: r.requestId,
|
|
3280
|
+
date: r.date,
|
|
3281
|
+
fraction: Number.parseFloat(r.fraction),
|
|
3282
|
+
counted: r.counted,
|
|
3283
|
+
status: r.status,
|
|
3284
|
+
})),
|
|
3285
|
+
ledger: data.leave.ledger.map(toLedgerEntry),
|
|
3286
|
+
closingBalanceMinutes: closingBalance(data.leave.ledger),
|
|
3287
|
+
},
|
|
3288
|
+
attendance: {
|
|
3289
|
+
punches: data.attendance.punches.map(toPunch),
|
|
3290
|
+
days: data.attendance.days.map(toAttendanceDay),
|
|
3291
|
+
},
|
|
3292
|
+
regularizations: data.regularizations.map(toRegularization),
|
|
3293
|
+
approvals: {
|
|
3294
|
+
raised: data.approvals.raised.map((r) => ({
|
|
3295
|
+
...r,
|
|
3296
|
+
subjectType: r.subjectType,
|
|
3297
|
+
status: r.status,
|
|
3298
|
+
// The requester is the subject of this bundle, so the name is already loaded —
|
|
3299
|
+
// and after an erasure it is the tombstone token, which is the right answer.
|
|
3300
|
+
requesterName: person.displayName,
|
|
3301
|
+
requestedAt: r.requestedAt.toISOString(),
|
|
3302
|
+
decidedAt: r.decidedAt?.toISOString() ?? null,
|
|
3303
|
+
steps: data.approvals.raisedSteps.filter((s) => s.requestId === r.id).map(toStep),
|
|
3304
|
+
})),
|
|
3305
|
+
approverOn: data.approvals.approverOn.map(toStep),
|
|
3306
|
+
decisions: data.approvals.decisions.map((d) => ({
|
|
3307
|
+
...d,
|
|
3308
|
+
decision: d.decision,
|
|
3309
|
+
at: d.at.toISOString(),
|
|
3310
|
+
})),
|
|
3311
|
+
},
|
|
3312
|
+
delegations: {
|
|
3313
|
+
given: data.delegations.given.map(toDelegation),
|
|
3314
|
+
received: data.delegations.received.map(toDelegation),
|
|
3315
|
+
},
|
|
3316
|
+
policiesInForce,
|
|
3317
|
+
accessLog: data.accessLog.map(HrAuditService.toEntry),
|
|
3318
|
+
};
|
|
3319
|
+
});
|
|
3320
|
+
}),
|
|
3321
|
+
/**
|
|
3322
|
+
* Redact a person, or say what redacting them would do.
|
|
3323
|
+
*
|
|
3324
|
+
* One transaction for the whole erasure: a half-run erasure is worse than a refused one, and a
|
|
3325
|
+
* partial one is not something anybody could tell had happened. It is replayable as well as
|
|
3326
|
+
* atomic — every step matches only rows that still have something to clear — so the recovery
|
|
3327
|
+
* from any failure is to run it again.
|
|
3328
|
+
*
|
|
3329
|
+
* The dry run takes the same transaction and rolls nothing back because it writes nothing; it
|
|
3330
|
+
* runs the identical predicates, which is what stops a preview drifting from the act.
|
|
3331
|
+
*/
|
|
3332
|
+
erase: scoped.privacy.erase.use(requires('hr.privacy.manage')).handler(async ({ input, context }) => {
|
|
3333
|
+
const result = await db.withWorkspace(input.workspaceId, (tx) => privacy.erase(tx, {
|
|
3334
|
+
workspaceId: input.workspaceId,
|
|
3335
|
+
personId: input.personId,
|
|
3336
|
+
dryRun: input.dryRun,
|
|
3337
|
+
reason: input.reason ?? null,
|
|
3338
|
+
keepNationalIdForAudit: input.keepNationalIdForAudit,
|
|
3339
|
+
actorUserId: context.principal.userId ?? null,
|
|
3340
|
+
}));
|
|
3341
|
+
// Only a real run moved anything. A dry run that pushed a realtime change would blank the
|
|
3342
|
+
// person's card on every open screen in the workspace for a preview nobody committed.
|
|
3343
|
+
if (!input.dryRun)
|
|
3344
|
+
await changed(input.workspaceId, 'person', input.personId, 'updated');
|
|
3345
|
+
return {
|
|
3346
|
+
workspaceId: input.workspaceId,
|
|
3347
|
+
personId: input.personId,
|
|
3348
|
+
dryRun: input.dryRun,
|
|
3349
|
+
erasedAt: result.erasedAt?.toISOString() ?? null,
|
|
3350
|
+
displayName: result.displayName,
|
|
3351
|
+
redacted: result.redacted,
|
|
3352
|
+
kept: result.kept,
|
|
3353
|
+
caveats: result.caveats,
|
|
3354
|
+
filesRemaining: result.filesRemaining,
|
|
3355
|
+
};
|
|
3356
|
+
}),
|
|
3357
|
+
accessLog: {
|
|
3358
|
+
/**
|
|
3359
|
+
* Who read this person's sensitive fields.
|
|
3360
|
+
*
|
|
3361
|
+
* **No `requires()`, and that is the whole design of this procedure.** Reading your own
|
|
3362
|
+
* access log is a thing nobody may lack — a grantable key here could only ever be one
|
|
3363
|
+
* somebody could be *denied*, and "you may not see who has been looking at your bank
|
|
3364
|
+
* details" is not a state this product should be able to express. It is in
|
|
3365
|
+
* `module.test.ts`'s `SELF_SERVICE` allowlist for that reason, beside `people.me`.
|
|
3366
|
+
*
|
|
3367
|
+
* The permission check is in the handler because it depends on the arguments: any
|
|
3368
|
+
* `personId` that is not the caller's own, and any `actorUserId` at all. The second is not
|
|
3369
|
+
* the smaller case — "what has this account been looking at" is an investigation into a
|
|
3370
|
+
* colleague, and it is the query that makes this log a thing to be careful with rather than
|
|
3371
|
+
* only a thing to be reassured by.
|
|
3372
|
+
*/
|
|
3373
|
+
list: scoped.privacy.accessLog.list.handler(({ input, context }) => db.withWorkspace(input.workspaceId, async (tx) => {
|
|
3374
|
+
const own = await access.personIdOf(tx, input.workspaceId, context.principal);
|
|
3375
|
+
const aboutSomebodyElse = input.personId !== undefined && input.personId !== own;
|
|
3376
|
+
const isInvestigation = input.actorUserId !== undefined;
|
|
3377
|
+
if (aboutSomebodyElse || isInvestigation)
|
|
3378
|
+
await kernel.authz.require(context.principal, 'hr.privacy.manage', {
|
|
3379
|
+
kind: 'workspace',
|
|
3380
|
+
workspaceId: input.workspaceId,
|
|
3381
|
+
});
|
|
3382
|
+
// A member who was never made a person has no log of their own and no permission to
|
|
3383
|
+
// read anybody's. Refusing beats returning an empty page, which reads as "nobody has
|
|
3384
|
+
// ever looked at your record" — an answer, and the wrong one.
|
|
3385
|
+
if (!aboutSomebodyElse && !isInvestigation && !own)
|
|
3386
|
+
throw KernError.notFound('Person');
|
|
3387
|
+
const cursor = decodeCursor(input.cursor);
|
|
3388
|
+
const rows = await audit.list(tx, {
|
|
3389
|
+
workspaceId: input.workspaceId,
|
|
3390
|
+
personId: input.personId ?? own ?? undefined,
|
|
3391
|
+
actorUserId: input.actorUserId,
|
|
3392
|
+
limit: input.limit,
|
|
3393
|
+
after: cursor ? after(accessLogSort.at, accessLogSort.id, 'desc', cursor) : undefined,
|
|
3394
|
+
});
|
|
3395
|
+
// `atText`, never the `Date`: one export writes its rows in a single insert, so they
|
|
3396
|
+
// share `now()` to the microsecond, and a millisecond-truncated cursor drops every row
|
|
3397
|
+
// that ties with the last one on the page.
|
|
3398
|
+
const { items, nextCursor } = paginate(rows, input.limit, (r) => [r.atText, r.id]);
|
|
3399
|
+
// No `total`. Counting an append-only log a subject scrolls through costs a second scan
|
|
3400
|
+
// of the same rows to answer a question nobody asked, and `page()` makes it optional
|
|
3401
|
+
// precisely so a list can decline.
|
|
3402
|
+
return { items: items.map(HrAuditService.toEntry), nextCursor };
|
|
3403
|
+
})),
|
|
3404
|
+
},
|
|
3405
|
+
retention: {
|
|
3406
|
+
/**
|
|
3407
|
+
* The horizons, and what is already past them.
|
|
3408
|
+
*
|
|
3409
|
+
* `sweepEnabled` is a literal `false` in the contract, and it says the thing this feature
|
|
3410
|
+
* must not imply: nothing in HR deletes on a timer. The horizons are read here, to count
|
|
3411
|
+
* what has passed one, and by `privacy.erase`, to say under which horizon each surviving
|
|
3412
|
+
* class was kept. An unattended job that prunes personnel records is the one act in this
|
|
3413
|
+
* module that cannot be undone by re-running anything, so it ships off, with a dry run and
|
|
3414
|
+
* a per-run report naming every person it touched — and until it exists, saying so in the
|
|
3415
|
+
* response is what keeps this screen from promising it.
|
|
3416
|
+
*/
|
|
3417
|
+
get: scoped.privacy.retention.get.use(requires('hr.privacy.manage')).handler(({ input }) => db.withWorkspace(input.workspaceId, async (tx) => {
|
|
3418
|
+
const { retention, updatedAt, updatedBy } = await privacy.retention(tx, input.workspaceId);
|
|
3419
|
+
const counts = input.withCounts
|
|
3420
|
+
? await privacy.retentionCounts(tx, input.workspaceId, retention)
|
|
3421
|
+
: null;
|
|
3422
|
+
return {
|
|
3423
|
+
workspaceId: input.workspaceId,
|
|
3424
|
+
classes: RETENTION_CLASSES.map((cls) => ({
|
|
3425
|
+
class: cls,
|
|
3426
|
+
days: retention[cls],
|
|
3427
|
+
dueNow: counts?.[cls] ?? null,
|
|
3428
|
+
})),
|
|
3429
|
+
updatedAt: updatedAt?.toISOString() ?? null,
|
|
3430
|
+
updatedBy,
|
|
3431
|
+
sweepEnabled: false,
|
|
3432
|
+
};
|
|
3433
|
+
})),
|
|
3434
|
+
set: scoped.privacy.retention.set.use(requires('hr.privacy.manage')).handler(({ input, context }) => db.withWorkspace(input.workspaceId, async (tx) => {
|
|
3435
|
+
const { retention, updatedAt, updatedBy } = await privacy.setRetention(tx, input.workspaceId, input.retention, context.principal.userId ?? null);
|
|
3436
|
+
// The counts are not recomputed on a write: a screen that has just changed a horizon
|
|
3437
|
+
// asks for them again, and doing eight counts inside the write transaction would hold
|
|
3438
|
+
// it open across the most expensive queries in this file.
|
|
3439
|
+
return {
|
|
3440
|
+
workspaceId: input.workspaceId,
|
|
3441
|
+
classes: RETENTION_CLASSES.map((cls) => ({
|
|
3442
|
+
class: cls,
|
|
3443
|
+
days: retention[cls],
|
|
3444
|
+
dueNow: null,
|
|
3445
|
+
})),
|
|
3446
|
+
updatedAt: updatedAt?.toISOString() ?? null,
|
|
3447
|
+
updatedBy,
|
|
3448
|
+
sweepEnabled: false,
|
|
3449
|
+
};
|
|
3450
|
+
})),
|
|
3451
|
+
},
|
|
3452
|
+
},
|
|
3171
3453
|
});
|
|
3172
3454
|
// ------------------------------------------------------------------ helpers
|
|
3173
3455
|
// Closures over `kernel` and `db`, kept at the bottom so the router above reads as a list of
|
|
3174
3456
|
// procedures rather than a list of procedures interrupted by plumbing.
|
|
3457
|
+
/**
|
|
3458
|
+
* The `people.custom` keys this reader may not be shown.
|
|
3459
|
+
*
|
|
3460
|
+
* `custom_field_defs.sensitive` has been declared, stored, editable and documented as "needs
|
|
3461
|
+
* `hr.person.view_sensitive`, like a national identity number" since the day custom fields
|
|
3462
|
+
* shipped — and until now **nothing read it**. `toPerson` returns `custom` whole and `forViewer`
|
|
3463
|
+
* narrows only the four personnel fields, so a field an administrator deliberately marked
|
|
3464
|
+
* sensitive went to every holder of `hr.person.view`, which is a `member` default. That is the
|
|
3465
|
+
* same defect as a permission key nothing asks about, one level down, and it is why the fix lands
|
|
3466
|
+
* here rather than waiting for a screen.
|
|
3467
|
+
*
|
|
3468
|
+
* Empty for a reader who holds the permission, and empty for a workspace with no sensitive fields
|
|
3469
|
+
* — which is the ordinary case and the one that must not pay for this. Archived definitions are
|
|
3470
|
+
* still counted: `fields.archive` deliberately leaves the values in `people.custom`, so an
|
|
3471
|
+
* archived sensitive field is a sensitive value with its guard removed.
|
|
3472
|
+
*
|
|
3473
|
+
* A person always sees their own, which is the same rule `people.me` follows: a permission you
|
|
3474
|
+
* would need to read your own record is one nobody may lack.
|
|
3475
|
+
*/
|
|
3476
|
+
async function sensitiveCustomKeys(tx, workspaceId, principal) {
|
|
3477
|
+
if (await kernel.authz.can(principal, 'hr.person.view_sensitive', { kind: 'workspace', workspaceId }))
|
|
3478
|
+
return NO_HIDDEN_FIELDS;
|
|
3479
|
+
const rows = await tx
|
|
3480
|
+
.select({ key: customFieldDefs.key })
|
|
3481
|
+
.from(customFieldDefs)
|
|
3482
|
+
.where(and(eq(customFieldDefs.workspaceId, workspaceId), eq(customFieldDefs.sensitive, true)));
|
|
3483
|
+
return rows.length ? new Set(rows.map((r) => r.key)) : NO_HIDDEN_FIELDS;
|
|
3484
|
+
}
|
|
3175
3485
|
async function loadOffice(tx, input) {
|
|
3176
3486
|
const [row] = await tx
|
|
3177
3487
|
.select()
|