javascript-solid-server 0.0.95 → 0.0.96

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "javascript-solid-server",
3
- "version": "0.0.95",
3
+ "version": "0.0.96",
4
4
  "description": "A minimal, fast Solid server",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
package/src/db/index.js CHANGED
@@ -49,6 +49,9 @@ export async function dbPlugin(fastify, options) {
49
49
  return reply.code(401).send({ error: 'Unauthorized', message: 'Authentication required' });
50
50
  }
51
51
 
52
+ // Single-user mode: any authenticated user is the owner
53
+ if (options.singleUser) return;
54
+
52
55
  // Ownership check: only pod owner can write to /db/{podName}/...
53
56
  const urlPath = request.url.split('?')[0];
54
57
  const relative = urlPath.replace(/^\/db\//, '');
package/src/server.js CHANGED
@@ -236,7 +236,7 @@ export function createServer(options = {}) {
236
236
 
237
237
  // Register MongoDB /db/ route if enabled
238
238
  if (mongoEnabled) {
239
- fastify.register(dbPlugin, { mongoUrl, mongoDatabase });
239
+ fastify.register(dbPlugin, { mongoUrl, mongoDatabase, singleUser });
240
240
  }
241
241
 
242
242
  // Register rate limiting plugin