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