openvibers/openvibe.network Commits
Network: account export and deletion wait for deals, trade, tips, vip, watch, services, wiki, blog and bot too (ADR-033; each answers through openvibe-sdk/account-data and is subscribed) (#94)
Changes
@@@ -88,8 +88,10 @@ const DEFAULT_GRANTS = [['games', 'mods.grant.manage', SELF_AUDIENCE, []],// Account export and deletion (ADR-033): the services that keep data about people push their export part and// confirm a deletion; the holders of each grant are the services Network waits for.-- // Since 2026-10-08 the services built from the skeleton answer too, through openvibe-sdk/account-data (SDK 0.36.0).-- ...['live', 'chat', 'community', 'media', 'games', 'actor', 'food', 'help', 'work', 'quest', 'rent', 'media-hub'].flatMap((svc) => [++ // Since 2026-10-08 the services built from the skeleton answer too, through openvibe-sdk/account-data (SDK 0.36.0),++ // and since 2026-10-09 the older services that hold personal rows (SDK 0.37.0; each subscribed before this grant).++ ...['live', 'chat', 'community', 'media', 'games', 'actor', 'food', 'help', 'work', 'quest', 'rent', 'media-hub',++ 'deals', 'trade', 'tips', 'vip', 'watch', 'services', 'wiki', 'blog', 'bot'].flatMap((svc) => [[svc, 'network.account.export.contribute', SELF_AUDIENCE, []],[svc, 'network.account.deletion.confirm', SELF_AUDIENCE, []],]),@@@ -93,11 +93,11 @@ const server = http.createServer(app);// ── Export ──const seeded = await accountData.expectedServices(db, 'network.account.export.contribute');-- assert.deepStrictEqual(seeded, ['actor', 'chat', 'community', 'food', 'games', 'help', 'live', 'media', 'media-hub', 'quest', 'rent', 'work'],-- 'the holders of the contribute grant: the skeleton services answer too since 2026-10-08 (openvibe-sdk/account-data); Space left with the forum');-- // The scenarios below follow five services; the six newer ones are set aside here, exactly as an operator would++ assert.deepStrictEqual(seeded, ['actor', 'blog', 'bot', 'chat', 'community', 'deals', 'food', 'games', 'help', 'live', 'media', 'media-hub', 'quest', 'rent', 'services', 'tips', 'trade', 'vip', 'watch', 'wiki', 'work'],++ 'the holders of the contribute grant: the skeleton services answer too since 2026-10-08 and the older ones since 2026-10-09 (openvibe-sdk/account-data); Space left with the forum');++ // The scenarios below follow five services; the newer ones are set aside here, exactly as an operator would// revoke a service's grant (the same rows, the same revoked_at).-- for (const svc of ['actor', 'food', 'help', 'media-hub', 'quest', 'rent', 'work']) {++ for (const svc of ['actor', 'blog', 'bot', 'deals', 'food', 'help', 'media-hub', 'quest', 'rent', 'services', 'tips', 'trade', 'vip', 'watch', 'wiki', 'work']) {for (const cap of ['network.account.export.contribute', 'network.account.deletion.confirm']) {await db.prepare('UPDATE principal_grants SET revoked_at = ov_now() WHERE client_id = ? AND capability = ? AND revoked_at IS NULL').run(svc, cap);}
@@ -88,8 +88,10 @@ const DEFAULT_GRANTS = [
@@ -88,8 +88,10 @@ const DEFAULT_GRANTS = [
['games', 'mods.grant.manage', SELF_AUDIENCE, []],
['games', 'mods.grant.manage', SELF_AUDIENCE, []],
// Account export and deletion (ADR-033): the services that keep data about people push their export part and
// Account export and deletion (ADR-033): the services that keep data about people push their export part and
// confirm a deletion; the holders of each grant are the services Network waits for.
// confirm a deletion; the holders of each grant are the services Network waits for.
- // Since 2026-10-08 the services built from the skeleton answer too, through openvibe-sdk/account-data (SDK 0.36.0).
- ...['live', 'chat', 'community', 'media', 'games', 'actor', 'food', 'help', 'work', 'quest', 'rent', 'media-hub'].flatMap((svc) => [
+ // Since 2026-10-08 the services built from the skeleton answer too, through openvibe-sdk/account-data (SDK 0.36.0),
+ // and since 2026-10-09 the older services that hold personal rows (SDK 0.37.0; each subscribed before this grant).
+ ...['live', 'chat', 'community', 'media', 'games', 'actor', 'food', 'help', 'work', 'quest', 'rent', 'media-hub',
+ 'deals', 'trade', 'tips', 'vip', 'watch', 'services', 'wiki', 'blog', 'bot'].flatMap((svc) => [
[svc, 'network.account.export.contribute', SELF_AUDIENCE, []],
[svc, 'network.account.export.contribute', SELF_AUDIENCE, []],
[svc, 'network.account.deletion.confirm', SELF_AUDIENCE, []],
[svc, 'network.account.deletion.confirm', SELF_AUDIENCE, []],
]),
]),
@@ -93,11 +93,11 @@ const server = http.createServer(app);
@@ -93,11 +93,11 @@ const server = http.createServer(app);
// ── Export ──
// ── Export ──
const seeded = await accountData.expectedServices(db, 'network.account.export.contribute');
const seeded = await accountData.expectedServices(db, 'network.account.export.contribute');
- assert.deepStrictEqual(seeded, ['actor', 'chat', 'community', 'food', 'games', 'help', 'live', 'media', 'media-hub', 'quest', 'rent', 'work'],
- 'the holders of the contribute grant: the skeleton services answer too since 2026-10-08 (openvibe-sdk/account-data); Space left with the forum');
- // The scenarios below follow five services; the six newer ones are set aside here, exactly as an operator would
+ assert.deepStrictEqual(seeded, ['actor', 'blog', 'bot', 'chat', 'community', 'deals', 'food', 'games', 'help', 'live', 'media', 'media-hub', 'quest', 'rent', 'services', 'tips', 'trade', 'vip', 'watch', 'wiki', 'work'],
+ 'the holders of the contribute grant: the skeleton services answer too since 2026-10-08 and the older ones since 2026-10-09 (openvibe-sdk/account-data); Space left with the forum');
+ // The scenarios below follow five services; the newer ones are set aside here, exactly as an operator would
// revoke a service's grant (the same rows, the same revoked_at).
// revoke a service's grant (the same rows, the same revoked_at).
- for (const svc of ['actor', 'food', 'help', 'media-hub', 'quest', 'rent', 'work']) {
+ for (const svc of ['actor', 'blog', 'bot', 'deals', 'food', 'help', 'media-hub', 'quest', 'rent', 'services', 'tips', 'trade', 'vip', 'watch', 'wiki', 'work']) {
for (const cap of ['network.account.export.contribute', 'network.account.deletion.confirm']) {
for (const cap of ['network.account.export.contribute', 'network.account.deletion.confirm']) {
await db.prepare('UPDATE principal_grants SET revoked_at = ov_now() WHERE client_id = ? AND capability = ? AND revoked_at IS NULL').run(svc, cap);
await db.prepare('UPDATE principal_grants SET revoked_at = ov_now() WHERE client_id = ? AND capability = ? AND revoked_at IS NULL').run(svc, cap);
}
}