Promote authenticated BIM share viewers

This commit is contained in:
CODEX
2026-06-23 00:16:06 +03:00
parent f680d6bad2
commit 09492a5fdc
4 changed files with 24 additions and 8 deletions
+7 -2
View File
@@ -1531,10 +1531,15 @@ const handleGetShare = async (req, res, token) => {
sendText(res, 404, "Share not found");
return;
}
const session = getCurrentBimSession(req);
const authenticated = !!session;
sendJSON(res, 200, {
ok: true,
mode: "guest",
readonly: true,
mode: authenticated ? "standard" : "guest",
readonly: !authenticated,
authenticated,
canShare: !BIM_AUTH_REQUIRED || authenticated,
user: session?.user || null,
viewer: {
src: publicUrlForUploadSrc(req, share.src),
settingsSrc: publicUrlForUploadSrc(req, share.settingsSrc || share.src),