From 132803d67250ae1c421a4b83369f7528a28ecda3 Mon Sep 17 00:00:00 2001 From: Juan Castro Date: Thu, 13 Aug 2026 17:15:16 -0400 Subject: [PATCH] fix(gui): name the real owner in the share dialog --- src/gui/src/UI/UIWindowShare.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gui/src/UI/UIWindowShare.js b/src/gui/src/UI/UIWindowShare.js index 51d1bba98..dcaedd494 100644 --- a/src/gui/src/UI/UIWindowShare.js +++ b/src/gui/src/UI/UIWindowShare.js @@ -35,11 +35,17 @@ const mode_label = (mode) => { * @param {object} options * @param {string} options.path Item to share. * @param {string} [options.name] Display name; defaults to the path's basename. + * @param {string} [options.owner] Owner's username; defaults to the first path + * segment, which is not the current user when a `manage` recipient opens this. */ async function UIWindowShare (options) { options = options ?? {}; const item_path = options.path; const item_name = options.name ?? path.basename(item_path); + const item_owner = + options.owner + ?? item_path?.split('/').filter(Boolean)[0] + ?? window.user.username; let h = ''; h += '
'; @@ -104,7 +110,7 @@ async function UIWindowShare (options) { let rows = ''; // The owner's access comes from owning the item, so it can't be revoked rows += '';