From d7556aa0876917eea40e6705aebb4a6bac4af92b Mon Sep 17 00:00:00 2001 From: locphamtran Date: Thu, 11 Jun 2026 19:49:40 +0700 Subject: [PATCH] =?UTF-8?q?L=E1=BA=A5y=20link=20public=20chia=20s=E1=BA=BB?= =?UTF-8?q?=20cho=20guest?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/js/main_map.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/frontend/js/main_map.js b/frontend/js/main_map.js index 25463c4..9542ca6 100644 --- a/frontend/js/main_map.js +++ b/frontend/js/main_map.js @@ -1087,11 +1087,14 @@ async function loadScenes(urlToken = null) { if (isAdmin || isOwner) { handleEditDeleteScene(scene); - } else if (scene.privacy === 'public') { - // Cho phép bất kỳ ai (kể cả khách) lấy link chia sẻ của scene công khai - showShareLink(scene); } else { - showNotification("Bạn không có quyền chỉnh sửa scene này.", 'warning'); + // Kiểm tra xem Tour hoặc Scene có công khai (Public) không để khách có thể lấy link chia sẻ + const isPublic = (scene.privacy === 'public') || (scene.tourId && scene.tourId.privacy === 'public'); + if (isPublic) { + showShareLink(scene); + } else { + showNotification("Bạn không có quyền lấy link chia sẻ của nội dung riêng tư này.", 'warning'); + } } });