Add Super Viewer read-only administrator role
CI / checks (push) Successful in 5m40s

This commit is contained in:
2026-10-11 23:30:40 -04:00
parent 253d47300c
commit 4ea291d305
48 changed files with 1684 additions and 933 deletions
+4 -3
View File
@@ -377,7 +377,7 @@ it('never removes the calibration window when choosing a shorter resource retent
n: 0
});
});
it('previews draft retention without saving it and restricts retention tools to administrators', async () => {
it('previews draft retention without saving it and distinguishes admin reads from writes', async () => {
const a = await api();
a.db
.prepare(
@@ -401,8 +401,9 @@ it('previews draft retention without saving it and restricts retention tools to
expect(a.fleetSettings().deployKeepDays).toBe(0);
expect(a.db.prepare('SELECT id FROM deployments').get()).toEqual({ id: 'preview' });
const { routePermission } = await import('../../src/lib/server/auth/access.js');
expect(routePermission('/api/settings/retention', 'GET')).toBe('admin');
expect(routePermission('/api/settings/retention/preview', 'POST')).toBe('admin');
expect(routePermission('/api/settings/retention', 'GET')).toBe('admin-read');
expect(routePermission('/api/settings/retention', 'POST')).toBe('admin');
expect(routePermission('/api/settings/retention/preview', 'POST')).toBe('admin-read');
});
it('protects cancelled workflows and linked file history through ambiguous and unreconciled receipts', async () => {
const a = await api();