feat: 태그 그룹 게시판 매핑 엄격 모드 — 미체크 그룹은 어디에도 미노출
CI / build (push) Failing after 12m19s

- listWritableGroups: 명시적으로 매핑된 게시판에만 노출(boards.contains)
- 게시판 미지정 그룹은 글쓰기에서 숨김 (수정 화면은 기존 글 태그 유실 방지로 전체 표시 유지)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
ByungCheol
2026-06-28 15:24:12 +09:00
parent 1e93280140
commit d5366e8e72
@@ -43,8 +43,8 @@ public class TagService {
}
/**
* 글 작성 시 선택 가능한 태그 그룹 — 해당 게시판에 매핑된 그룹만.
* 매핑이 하나도 없는 그룹은 전체 게시판에서 노출(하위호환).
* 글 작성 시 선택 가능한 태그 그룹 — 해당 게시판에 명시적으로 매핑된 그룹만(엄격).
* 게시판을 하나도 지정하지 않은 그룹은 어디에도 노출되지 않는다.
*/
public List<TagCategoryResponse> listWritableGroups(String boardCategory) {
// 게시판 미지정(수정 화면 등) → 전체 그룹 (기존 글 태그 유실 방지)
@@ -55,7 +55,7 @@ public class TagService {
for (TagCategory c : categoryMapper.findAll()) {
TagCategoryResponse g = toGroup(c);
List<String> boards = g.getBoards();
if (boards == null || boards.isEmpty() || boards.contains(boardCategory)) {
if (boards != null && boards.contains(boardCategory)) {
result.add(g);
}
}