feat: appove and go

This commit is contained in:
thanhnv
2026-07-19 09:37:16 +07:00
parent 13fae3e6c3
commit 709b6cccd6
24 changed files with 1245 additions and 70 deletions
@@ -15,10 +15,11 @@ test('auth context keeps local explicit roles for dev', () => {
test('auth context maps IdP group claim to RBAC role', () => {
const actor = actorFromHeaders({
'x-auth-request-user': 'bob@example.com',
'x-auth-request-groups': 'engineering,casan-approver',
'x-auth-request-groups': 'engineering,casan-approver,casan-project:AINative_OKR_CASAN4',
});
assert.equal(actor.actor, 'bob@example.com');
assert.equal(actor.role, 'approver');
assert.equal(actor.project, 'AINative_OKR_CASAN4');
});
test('auth context fails closed to viewer for unknown role claim', () => {