fix(dashboard): 권한 있는 페이지만 표시
기본 접근 페이지 전체 추가 로직 제거. 부서 권한 + 개인 권한에 등록된 페이지만 내 메뉴에 노출. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -103,10 +103,7 @@ const DashboardModel = {
|
||||
`, [userId]);
|
||||
const personalPageIds = new Set(personalRows.map(r => r.page_id));
|
||||
|
||||
// 기본 접근 페이지
|
||||
const defaultPages = allPages.filter(p => !p.is_admin_only);
|
||||
|
||||
// 분류 (부서 우선, 중복 없음)
|
||||
// 분류 (부서 우선, 중복 없음 — 권한 있는 페이지만)
|
||||
const departmentPages = [];
|
||||
const personalPages = [];
|
||||
|
||||
@@ -120,14 +117,6 @@ const DashboardModel = {
|
||||
}
|
||||
}
|
||||
|
||||
// 기본 접근 페이지 중 부서/개인에 없는 것 추가
|
||||
const addedIds = new Set([...departmentPages.map(p => p.page_key), ...personalPages.map(p => p.page_key)]);
|
||||
for (const page of defaultPages) {
|
||||
if (!addedIds.has(page.page_key) && !page.is_admin_only) {
|
||||
departmentPages.push(formatPage(page));
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
department_pages: departmentPages,
|
||||
personal_pages: personalPages,
|
||||
|
||||
Reference in New Issue
Block a user