fix(tkfb): is_admin_only 레거시 필터 제거

과거 권한 시스템 잔재인 is_admin_only 필터를 모든 런타임 코드에서 제거.
현재 체계: admin=모든 페이지, 일반 사용자=권한 부여된 페이지만.
DB에서도 is_admin_only = 0으로 통일 (22건 갱신).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Hyungi Ahn
2026-03-31 07:17:30 +09:00
parent 5ac7af7b04
commit d3cef659ce
3 changed files with 3 additions and 12 deletions

View File

@@ -95,9 +95,6 @@ router.get('/users/:userId/page-access', requireAuth, async (req, res) => {
ON dpp.department_id = ?
AND (dpp.page_name = CONCAT('s1.', p.page_key) OR dpp.page_name = p.page_key)
LEFT JOIN users u2 ON upa.granted_by = u2.user_id
WHERE p.is_admin_only = 0
OR upa.can_access = 1
OR dpp.can_access = 1
ORDER BY p.display_order, p.page_name
`, [userId, departmentId]);
@@ -232,7 +229,7 @@ router.get('/page-access/summary', requireAuth, async (req, res) => {
u.name,
r.name as role_name,
COUNT(DISTINCT upa.page_id) as accessible_pages_count,
(SELECT COUNT(*) FROM pages WHERE is_admin_only = 0) as total_pages_count
(SELECT COUNT(*) FROM pages) as total_pages_count
FROM users u
LEFT JOIN roles r ON u.role_id = r.id
LEFT JOIN user_page_access upa ON u.user_id = upa.user_id AND upa.can_access = 1