fix(notifications): 알림 수신자 관리 비admin 사용자 권한 허용

본인 수신자 추가/제거는 모든 인증 사용자 허용, 타인 수신자 관리는 관리자만 허용하도록 변경

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Hyungi Ahn
2026-03-13 15:50:23 +09:00
parent 3011495e6d
commit be24c12551
2 changed files with 14 additions and 6 deletions

View File

@@ -16,13 +16,13 @@ router.get('/', controller.getAll);
// 유형별 수신자 조회
router.get('/:type', controller.getByType);
// 수신자 추가 (관리자만)
router.post('/', requireAdmin, controller.add);
// 수신자 추가 (본인: 모든 사용자, 타인: 관리자만 — 컨트롤러에서 검증)
router.post('/', controller.add);
// 유형별 수신자 일괄 설정 (관리자만)
router.put('/:type', requireAdmin, controller.setRecipients);
// 수신자 제거 (관리자만)
router.delete('/:type/:userId', requireAdmin, controller.remove);
// 수신자 제거 (본인: 모든 사용자, 타인: 관리자만 — 컨트롤러에서 검증)
router.delete('/:type/:userId', controller.remove);
module.exports = router;