diff --git a/system1-factory/web/pages/admin/attendance-report.html b/system1-factory/web/pages/admin/attendance-report.html index 0f89ea6..4556ef4 100644 --- a/system1-factory/web/pages/admin/attendance-report.html +++ b/system1-factory/web/pages/admin/attendance-report.html @@ -190,7 +190,7 @@ - + + + + + + + + diff --git a/system1-factory/web/pages/attendance/monthly.html b/system1-factory/web/pages/attendance/monthly.html index eb846de..4cbd1c6 100644 --- a/system1-factory/web/pages/attendance/monthly.html +++ b/system1-factory/web/pages/attendance/monthly.html @@ -489,7 +489,7 @@ - + + diff --git a/system1-factory/web/pages/attendance/my-vacation-info.html b/system1-factory/web/pages/attendance/my-vacation-info.html index d7fc71d..dd20cc8 100644 --- a/system1-factory/web/pages/attendance/my-vacation-info.html +++ b/system1-factory/web/pages/attendance/my-vacation-info.html @@ -267,7 +267,7 @@ - + + diff --git a/system1-factory/web/pages/attendance/vacation-approval.html b/system1-factory/web/pages/attendance/vacation-approval.html index adbd29d..4431d3b 100644 --- a/system1-factory/web/pages/attendance/vacation-approval.html +++ b/system1-factory/web/pages/attendance/vacation-approval.html @@ -130,7 +130,7 @@ - + diff --git a/system1-factory/web/pages/attendance/vacation-input.html b/system1-factory/web/pages/attendance/vacation-input.html index 1f7bceb..c03b1fd 100644 --- a/system1-factory/web/pages/attendance/vacation-input.html +++ b/system1-factory/web/pages/attendance/vacation-input.html @@ -123,7 +123,7 @@ - + diff --git a/system1-factory/web/pages/attendance/vacation-management.html b/system1-factory/web/pages/attendance/vacation-management.html index 27f32d5..1dfe3a7 100644 --- a/system1-factory/web/pages/attendance/vacation-management.html +++ b/system1-factory/web/pages/attendance/vacation-management.html @@ -215,7 +215,7 @@ - + diff --git a/system1-factory/web/pages/attendance/vacation-request.html b/system1-factory/web/pages/attendance/vacation-request.html index 4df6657..b89ad43 100644 --- a/system1-factory/web/pages/attendance/vacation-request.html +++ b/system1-factory/web/pages/attendance/vacation-request.html @@ -117,7 +117,7 @@ - + diff --git a/system1-factory/web/pages/attendance/work-status.html b/system1-factory/web/pages/attendance/work-status.html index 3ddd9f2..e03b96e 100644 --- a/system1-factory/web/pages/attendance/work-status.html +++ b/system1-factory/web/pages/attendance/work-status.html @@ -286,7 +286,7 @@ - + + diff --git a/system1-factory/web/pages/dashboard.html b/system1-factory/web/pages/dashboard.html index 142951c..16b6ad0 100644 --- a/system1-factory/web/pages/dashboard.html +++ b/system1-factory/web/pages/dashboard.html @@ -324,7 +324,7 @@ - + diff --git a/system1-factory/web/pages/inspection/daily-patrol.html b/system1-factory/web/pages/inspection/daily-patrol.html index ae1c61c..9356357 100644 --- a/system1-factory/web/pages/inspection/daily-patrol.html +++ b/system1-factory/web/pages/inspection/daily-patrol.html @@ -209,7 +209,7 @@ }, 50); })(); - + diff --git a/system1-factory/web/pages/inspection/zone-detail.html b/system1-factory/web/pages/inspection/zone-detail.html index 183d172..016e97c 100644 --- a/system1-factory/web/pages/inspection/zone-detail.html +++ b/system1-factory/web/pages/inspection/zone-detail.html @@ -304,7 +304,7 @@ }, 50); })(); - + diff --git a/system1-factory/web/pages/profile/info.html b/system1-factory/web/pages/profile/info.html index b49b9bc..1ddb057 100644 --- a/system1-factory/web/pages/profile/info.html +++ b/system1-factory/web/pages/profile/info.html @@ -320,7 +320,7 @@ - + diff --git a/system1-factory/web/pages/profile/password.html b/system1-factory/web/pages/profile/password.html index ce20e76..f0a171d 100644 --- a/system1-factory/web/pages/profile/password.html +++ b/system1-factory/web/pages/profile/password.html @@ -390,7 +390,7 @@ - + diff --git a/system1-factory/web/pages/work/analysis.html b/system1-factory/web/pages/work/analysis.html index 5316a9a..359d789 100644 --- a/system1-factory/web/pages/work/analysis.html +++ b/system1-factory/web/pages/work/analysis.html @@ -277,7 +277,7 @@ - + diff --git a/system1-factory/web/pages/work/daily-status.html b/system1-factory/web/pages/work/daily-status.html index 80ba487..939d1ab 100644 --- a/system1-factory/web/pages/work/daily-status.html +++ b/system1-factory/web/pages/work/daily-status.html @@ -163,7 +163,7 @@ - + diff --git a/system1-factory/web/pages/work/meeting-detail.html b/system1-factory/web/pages/work/meeting-detail.html index 51d0a35..8ec105d 100644 --- a/system1-factory/web/pages/work/meeting-detail.html +++ b/system1-factory/web/pages/work/meeting-detail.html @@ -193,7 +193,7 @@ - + diff --git a/system1-factory/web/pages/work/meetings.html b/system1-factory/web/pages/work/meetings.html index c182404..77ad1d3 100644 --- a/system1-factory/web/pages/work/meetings.html +++ b/system1-factory/web/pages/work/meetings.html @@ -80,7 +80,7 @@ - + diff --git a/system1-factory/web/pages/work/proxy-input.html b/system1-factory/web/pages/work/proxy-input.html index 2dbf9c1..9ef06f1 100644 --- a/system1-factory/web/pages/work/proxy-input.html +++ b/system1-factory/web/pages/work/proxy-input.html @@ -114,7 +114,7 @@ - + diff --git a/system1-factory/web/pages/work/report-create-mobile.html b/system1-factory/web/pages/work/report-create-mobile.html index dfabe3b..9738ca2 100644 --- a/system1-factory/web/pages/work/report-create-mobile.html +++ b/system1-factory/web/pages/work/report-create-mobile.html @@ -190,7 +190,7 @@ - + diff --git a/system1-factory/web/pages/work/report-create.html b/system1-factory/web/pages/work/report-create.html index 4922a21..40baf0f 100644 --- a/system1-factory/web/pages/work/report-create.html +++ b/system1-factory/web/pages/work/report-create.html @@ -149,7 +149,7 @@ - + diff --git a/system1-factory/web/pages/work/schedule.html b/system1-factory/web/pages/work/schedule.html index 7d4da71..2a64309 100644 --- a/system1-factory/web/pages/work/schedule.html +++ b/system1-factory/web/pages/work/schedule.html @@ -347,7 +347,7 @@ - + + diff --git a/system1-factory/web/pages/work/tbm-mobile.html b/system1-factory/web/pages/work/tbm-mobile.html index 2e8825b..4c49bf9 100644 --- a/system1-factory/web/pages/work/tbm-mobile.html +++ b/system1-factory/web/pages/work/tbm-mobile.html @@ -264,7 +264,7 @@ - + diff --git a/system1-factory/web/pages/work/tbm.html b/system1-factory/web/pages/work/tbm.html index d22cf62..d9f0037 100644 --- a/system1-factory/web/pages/work/tbm.html +++ b/system1-factory/web/pages/work/tbm.html @@ -573,7 +573,7 @@
- + diff --git a/system1-factory/web/static/js/tkfb-core.js b/system1-factory/web/static/js/tkfb-core.js index bd41a05..c41b82e 100644 --- a/system1-factory/web/static/js/tkfb-core.js +++ b/system1-factory/web/static/js/tkfb-core.js @@ -202,8 +202,7 @@ function renderNavbar(accessibleKeys) { const visibleItems = entry.items.filter(item => { if (item.admin && !isAdmin) return false; if (isAdmin) return true; - // NAV_MENU에 admin 아닌 항목은 공개 (publicPageKeys 대응) - if (!item.admin) return true; + if (item.external) return true; return accessibleKeys.includes(item.key); }); @@ -283,16 +282,13 @@ async function initAuth() { let accessibleKeys = []; if (!isAdmin) { accessibleKeys = await _fetchPageAccess(currentUser.id); - // NAV_MENU에서 admin/restricted가 아닌 페이지는 모든 인증 사용자에게 공개 - const publicPageKeys = NAV_MENU.flatMap(entry => { - if (!entry.items) return entry.key ? [entry.key] : []; - if (entry.admin) return []; - return entry.items.filter(item => !item.admin && !item.restricted).map(item => item.key); - }); - // 현재 페이지 접근 권한 확인 + if (accessibleKeys.length === 0) { + console.warn('[PageAccess] 접근 가능 페이지가 없거나 권한 조회 실패'); + } + // 현재 페이지 접근 권한 확인 (dashboard, profile은 전체 공개) const pageKey = _getCurrentPageKey(); if (pageKey && pageKey !== 'dashboard' && !pageKey.startsWith('profile.')) { - if (!publicPageKeys.includes(pageKey) && !accessibleKeys.includes(pageKey)) { + if (!accessibleKeys.includes(pageKey)) { alert('이 페이지에 접근할 권한이 없습니다.'); location.href = '/pages/dashboard-new.html'; return false;