최고관리자가 부여한 권한에 따라 메뉴 보여주기

This commit is contained in:
kjs
2025-10-27 18:27:32 +09:00
parent 15776e76f5
commit 821336d40d
8 changed files with 2265 additions and 30 deletions

View File

@@ -227,6 +227,15 @@ export const getUserList = async (req: AuthenticatedRequest, res: Response) => {
logger.info("회사 코드 필터 적용", { companyCode });
}
// 최고 관리자 필터링 (회사 관리자와 일반 사용자는 최고 관리자를 볼 수 없음)
if (req.user && req.user.companyCode !== "*") {
// 최고 관리자가 아닌 경우, company_code가 "*"인 사용자는 제외
whereConditions.push(`company_code != '*'`);
logger.info("최고 관리자 필터링 적용", {
userCompanyCode: req.user.companyCode,
});
}
// 검색 조건 처리
if (search && typeof search === "string" && search.trim()) {
// 통합 검색