From e4f61771131be635b9e81a19203a00707b4b19df Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Fri, 2 Oct 2026 10:20:09 +0200 Subject: feat(mnp): sharing a folder is decided on the node's machine only (MNP 6.0) root_add, root_update and group_attach leave MNP: adding a directory and switching writable/removable go through the loopback API (native dialog in the desktop app) or the CLI. The operator's Settings tab still lists the roots from any browser, read-only. The desktop app refuses to sign those ops; a loopback flag change now reaches open pages (publish_roots). Co-Authored-By: Claude Opus 5.5 --- packages/meshbay-client/src/main.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'packages/meshbay-client/src/main.js') diff --git a/packages/meshbay-client/src/main.js b/packages/meshbay-client/src/main.js index cbaabc4..0020084 100644 --- a/packages/meshbay-client/src/main.js +++ b/packages/meshbay-client/src/main.js @@ -2218,7 +2218,16 @@ function registerBridge() { await confirmFolder(body.path); return ['POST', target, body]; }, - updateRoot: (a) => ['PATCH', root(a), anObject(a.updates)], + // Opening a folder to writes from every member is asked like sharing it; + // closing it, or the removable flag, only narrows. + updateRoot: async (a) => { + const updates = anObject(a.updates); + if (updates.writable === true) { + await confirmOrRefuse('native.root_writable_confirm', + { name: aText(a.rootName, 'the folder name') }); + } + return ['PATCH', root(a), updates]; + }, ejectRoot: (a) => ['PUT', `${root(a)}/eject`], plugRoot: (a) => ['PUT', `${root(a)}/plug`], removeRoot: (a) => ['DELETE', root(a)], -- cgit v1.2.3