openvibers/openvibe.media Commits
The codes tenant, token-only: task screenshots, private to the person (#232)
Changes
@@@ -211,6 +211,7 @@ async function ensureTokenOnlyApps() {['blog', 'OpenVibe.Blog', 10, []], // Wave 16 post attachments['inventory', 'OpenVibe.Inventory', 1, []], // Workshop badge images['media-hub', 'OpenVibe.MediaHub', 100, []], // the OpenVibe.Download drive++ ['codes', 'OpenVibe.Codes', 5, []], // a task's screenshots, private to the person (Codes #188, 10-30)]) {if (!await db.getApp(appId)) {await db.run("INSERT INTO apps (app_id, name, api_key_hash, quota_bytes, allowed_origins) VALUES (?, ?, '', ?, ?)", [appId, name, quotaGb * 1024 ** 3, JSON.stringify(origins)]);@@@ -36,7 +36,7 @@ const crypto = require('crypto');await auth.ensureTokenOnlyApps();// C-71: every first-party tenant exists without seeding, and one boot created carries no app key. An existing row// (live, written with a test key just above) is left exactly as it was.-- for (const id of ['community', 'tools', 'games', 'wiki', 'blog', 'inventory', 'media-hub']) {++ for (const id of ['community', 'tools', 'games', 'wiki', 'blog', 'inventory', 'media-hub', 'codes']) {const row = await db.getApp(id);assert.ok(row, `${id} exists without seeding`);assert.strictEqual(row.api_key_hash, '', `${id} has no app key`);
@@ -211,6 +211,7 @@ async function ensureTokenOnlyApps() {
@@ -211,6 +211,7 @@ async function ensureTokenOnlyApps() {
['blog', 'OpenVibe.Blog', 10, []], // Wave 16 post attachments
['blog', 'OpenVibe.Blog', 10, []], // Wave 16 post attachments
['inventory', 'OpenVibe.Inventory', 1, []], // Workshop badge images
['inventory', 'OpenVibe.Inventory', 1, []], // Workshop badge images
['media-hub', 'OpenVibe.MediaHub', 100, []], // the OpenVibe.Download drive
['media-hub', 'OpenVibe.MediaHub', 100, []], // the OpenVibe.Download drive
+ ['codes', 'OpenVibe.Codes', 5, []], // a task's screenshots, private to the person (Codes #188, 10-30)
]) {
]) {
if (!await db.getApp(appId)) {
if (!await db.getApp(appId)) {
await db.run("INSERT INTO apps (app_id, name, api_key_hash, quota_bytes, allowed_origins) VALUES (?, ?, '', ?, ?)", [appId, name, quotaGb * 1024 ** 3, JSON.stringify(origins)]);
await db.run("INSERT INTO apps (app_id, name, api_key_hash, quota_bytes, allowed_origins) VALUES (?, ?, '', ?, ?)", [appId, name, quotaGb * 1024 ** 3, JSON.stringify(origins)]);
@@ -36,7 +36,7 @@ const crypto = require('crypto');
@@ -36,7 +36,7 @@ const crypto = require('crypto');
await auth.ensureTokenOnlyApps();
await auth.ensureTokenOnlyApps();
// C-71: every first-party tenant exists without seeding, and one boot created carries no app key. An existing row
// C-71: every first-party tenant exists without seeding, and one boot created carries no app key. An existing row
// (live, written with a test key just above) is left exactly as it was.
// (live, written with a test key just above) is left exactly as it was.
- for (const id of ['community', 'tools', 'games', 'wiki', 'blog', 'inventory', 'media-hub']) {
+ for (const id of ['community', 'tools', 'games', 'wiki', 'blog', 'inventory', 'media-hub', 'codes']) {
const row = await db.getApp(id);
const row = await db.getApp(id);
assert.ok(row, `${id} exists without seeding`);
assert.ok(row, `${id} exists without seeding`);
assert.strictEqual(row.api_key_hash, '', `${id} has no app key`);
assert.strictEqual(row.api_key_hash, '', `${id} has no app key`);