This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import { describe, it } from 'node:test';
|
||||
import { growthReadAllowed } from '../src/routes/growth';
|
||||
|
||||
describe('growth read boundary', () => {
|
||||
it('requires an explicit read scope instead of treating authentication as authorization', () => {
|
||||
assert.equal(growthReadAllowed([]), false);
|
||||
assert.equal(growthReadAllowed(['write']), false);
|
||||
assert.equal(growthReadAllowed(['read']), true);
|
||||
assert.equal(growthReadAllowed(['read', 'write']), true);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user