feat(auth): add opaque bearer sessions

This commit is contained in:
caoxiaozhu
2026-07-13 14:45:36 +08:00
parent 661990b27b
commit 653eda0596
59 changed files with 1408 additions and 408 deletions

View File

@@ -108,6 +108,11 @@ test('budget center is visible to platform admin, budget monitor, and executive
assert.equal(canAccessAppView({ roleCodes: ['manager'] }, 'budget'), false)
})
test('system settings are visible to platform admin instead of business managers', () => {
assert.equal(canAccessAppView({ isAdmin: true, roleCodes: ['manager'] }, 'settings'), true)
assert.equal(canAccessAppView({ roleCodes: ['manager'] }, 'settings'), false)
})
test('budget edit and department switching are limited to admin and senior finance', () => {
assert.equal(canEditBudgetCenter({ username: 'admin', roleCodes: ['manager'] }), true)
assert.equal(canSwitchBudgetDepartments({ username: 'admin', roleCodes: ['manager'] }), true)