fix: 관리자 게시판 등록 권한 및 URL 표시 개선

This commit is contained in:
이주일
2026-07-17 02:24:19 +09:00
parent c96dde1323
commit 48af5d88f4
3 changed files with 56 additions and 27 deletions

View File

@@ -393,6 +393,7 @@ public class BOBbsService {
if (vo.getBbscttRedngAuthorDvCd() != null && "01".equals(vo.getBbscttRedngAuthorDvCd())) {
vo.setBbscttRedngAuthorDvCd("[all]");
} else if (vo.getBbscttRedngAuthorDvCd() != null && "02".equals(vo.getBbscttRedngAuthorDvCd())) {
validateMemberGradeSelection(vo.getBbscttRedngAuthorDvCd_c(), "게시판 읽기");
StringBuilder sb = new StringBuilder();
for (String mbrInnb : vo.getBbscttRedngAuthorDvCd_c()) {
@@ -431,6 +432,8 @@ public class BOBbsService {
if (vo.getBbscttRegistAuthorDvCd() != null && "01".equals(vo.getBbscttRegistAuthorDvCd())) {
vo.setBbscttRegistAuthorDvCd("[all]");
} else if (vo.getBbscttRegistAuthorDvCd() != null && "02".equals(vo.getBbscttRegistAuthorDvCd())) {
validateMemberGradeSelection(vo.getBbscttRegistAuthorDvCd_c(), "게시판 쓰기");
StringBuilder sb = new StringBuilder();
for (String mbrInnb : vo.getBbscttRegistAuthorDvCd_c()) {
@@ -465,6 +468,8 @@ public class BOBbsService {
if (vo.getAnswRegistAuthorDvCd() != null && "01".equals(vo.getAnswRegistAuthorDvCd())) {
vo.setAnswRegistAuthorDvCd("[all]");
} else if (vo.getAnswRegistAuthorDvCd() != null && "02".equals(vo.getAnswRegistAuthorDvCd())) {
validateMemberGradeSelection(vo.getAnswRegistAuthorDvCd_c(), "답글 쓰기");
StringBuilder sb = new StringBuilder();
for (String mbrInnb : vo.getAnswRegistAuthorDvCd_c()) {
@@ -499,6 +504,8 @@ public class BOBbsService {
if (vo.getCmRegistAuthorDvCd() != null && "01".equals(vo.getCmRegistAuthorDvCd())) {
vo.setCmRegistAuthorDvCd("[all]");
} else if (vo.getCmRegistAuthorDvCd() != null && "02".equals(vo.getCmRegistAuthorDvCd())) {
validateMemberGradeSelection(vo.getCmRegistAuthorDvCd_c(), "댓글 쓰기");
StringBuilder sb = new StringBuilder();
for (String mbrInnb : vo.getCmRegistAuthorDvCd_c()) {
@@ -685,15 +692,21 @@ public class BOBbsService {
msgMap.put("bbsid", bbsId);
} catch (WnbtRestException wre){
throw new WnbtRestException(wre.getMessage());
throw wre;
} catch (Exception e) {
log.error(e.getMessage(), e);
throw new WnbtRestException("게시판 등록 중 오류가 발생했습니다.", e);
}
return msgMap;
}
private void validateMemberGradeSelection(String[] memberGradeArr, String authorizationName) {
if (memberGradeArr == null || memberGradeArr.length == 0) {
throw new WnbtRestException(authorizationName + " 권한의 회원등급을 선택해 주세요.");
}
}
/**
* 게시판 삭제