TK-FB(공장관리+신고)와 M-Project(부적합관리)를 3개 독립 시스템으로 분리하기 위한 전체 코드 구조 작성. - SSO 인증 서비스 (bcrypt + pbkdf2 이중 해시 지원) - System 1: 공장관리 (TK-FB 기반, 신고 코드 제거) - System 2: 신고 (TK-FB에서 workIssue 코드 추출) - System 3: 부적합관리 (M-Project 기반) - Gateway 포털 (path-based 라우팅) - 통합 docker-compose.yml 및 배포 스크립트 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
9 lines
261 B
JavaScript
9 lines
261 B
JavaScript
// utils/access.js
|
|
exports.requireAccess = (...allowed) => {
|
|
return (req, res, next) => {
|
|
if (!req.user || !allowed.includes(req.user.access_level)) {
|
|
return res.status(403).json({ error: '접근 권한이 없습니다' });
|
|
}
|
|
next();
|
|
};
|
|
}; |