From ae92614289342222a75a36072814ae119e554f79 Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 15 Oct 2020 16:09:09 +0200 Subject: [PATCH] Refresh ownership in the access modal --- www/common/inner/access.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/www/common/inner/access.js b/www/common/inner/access.js index 3b28344f7..d28b96d0f 100644 --- a/www/common/inner/access.js +++ b/www/common/inner/access.js @@ -349,6 +349,12 @@ define([ if (!reload) { return; } Modal.loadMetadata(Env, data, waitFor, "owner"); }).nThen(function () { + var owned = Modal.isOwned(Env, data); + if (typeof(owned) !== "boolean") { + teamOwner = Number(owned); + } else { + teamOwner = undefined; + } owners = data.owners || []; pending_owners = data.pending_owners || []; $div1.empty(); @@ -667,6 +673,12 @@ define([ if (!reload) { return; } Modal.loadMetadata(Env, data, waitFor, "allow"); }).nThen(function () { + var owned = Modal.isOwned(Env, data); + if (typeof(owned) !== "boolean") { + teamOwner = Number(owned); + } else { + teamOwner = undefined; + } owners = data.owners || []; restricted = data.restricted || false; allowed = data.allowed || [];