Sửa lỗi quản lí users, chỉnh sửa users

This commit is contained in:
2026-06-08 21:30:03 +07:00
parent 6dfc811292
commit fadfb6ba09
7 changed files with 376 additions and 35 deletions
+1 -1
View File
@@ -166,7 +166,7 @@ function applyViewerSecurity() {
const currentUserId = localStorage.getItem('userId');
// Phân quyền: Admin (Chủ sở hữu) hoặc Người tạo ra Scene này
const isAdmin = userRole === 'Chủ sở hữu' || userRole === 'admin';
const isAdmin = userRole === 'admin' || userRole === 'Chủ sở hữu';
const isAuthorized = isAdmin ||
(currentUserId && currentSceneOwnerId && currentUserId.toString() === currentSceneOwnerId.toString());