Licence: no licence is read-only, editing events blocked, heartbeat 30 s after start
- A site the Hub answers INSTALL_NOT_FOUND for drops its install and licence, so it no longer shows "Active" on the old token. - Unlicensed is read-only like suspended; read-only also blocks editing events, options and variants. LICENCE_CHECK_DISABLED (ignored in production) for e2e. - Heartbeat 30 s after the server starts and after a licence key is connected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -33,8 +33,8 @@ describe('licence tokens', () => {
|
||||
});
|
||||
|
||||
describe('licence states', () => {
|
||||
test('never connected → unlicensed, not read-only', () => {
|
||||
expect(stateFor(null, null, NOW)).toMatchObject({ state: 'unlicensed', readOnly: false });
|
||||
test('never connected → unlicensed, read-only like suspended', () => {
|
||||
expect(stateFor(null, null, NOW)).toMatchObject({ state: 'unlicensed', readOnly: true });
|
||||
});
|
||||
|
||||
test('a token for another install counts as none', () => {
|
||||
@@ -80,6 +80,9 @@ describe('heartbeat report', () => {
|
||||
describe('read-only mode', () => {
|
||||
test.each([
|
||||
['POST', '/api/events'],
|
||||
['PUT', '/api/events/ev_1'],
|
||||
['PUT', '/api/events/options/opt_1'],
|
||||
['PUT', '/api/events/variants/var_1'],
|
||||
['POST', '/api/registrations'],
|
||||
['POST', '/api/registrations/manual'],
|
||||
['PUT', '/api/registrations/abc/options'],
|
||||
@@ -92,6 +95,7 @@ describe('read-only mode', () => {
|
||||
test.each([
|
||||
['POST', '/api/tickets/scan/QR123'],
|
||||
['GET', '/api/events'],
|
||||
['PUT', '/api/events/ev_1/notify-recipients'],
|
||||
['PUT', '/api/registrations/abc'],
|
||||
['POST', '/api/payments/refund'],
|
||||
['POST', '/api/privacy/me/requests'],
|
||||
|
||||
Reference in New Issue
Block a user