diff --git a/modules/board/skins/cozy_board/view_document.html b/modules/board/skins/cozy_board/view_document.html index b045733e2..e05401822 100644 --- a/modules/board/skins/cozy_board/view_document.html +++ b/modules/board/skins/cozy_board/view_document.html @@ -156,7 +156,7 @@ - +
diff --git a/modules/board/skins/xe_board/view_document.html b/modules/board/skins/xe_board/view_document.html index ecf99441c..9ca66ceb8 100644 --- a/modules/board/skins/xe_board/view_document.html +++ b/modules/board/skins/xe_board/view_document.html @@ -169,7 +169,7 @@ - +
diff --git a/modules/document/document.item.php b/modules/document/document.item.php index c4b205344..2bb5eabe9 100644 --- a/modules/document/document.item.php +++ b/modules/document/document.item.php @@ -575,10 +575,23 @@ return $oEditorModel->getModuleEditor('document', $module_srl, $this->document_srl, 'document_srl', 'content'); } + /** + * @brief 댓글을 달 수 있는지에 대한 권한 체크 + * 게시글의 댓글 권한과 또 다른 부분 + **/ + function isEnableComment() { + // 권한이 없고 비밀글 or 댓글금지 or 댓글허용금지이면 return false + if(!$this->isGranted() && ( $this->isSecret() || $this->isLocked() || !$this->allowComment() ) ) return false; + + return true; + } + /** * @brief 댓글 에디터 html을 구해서 return **/ function getCommentEditor() { + if(!$this->isEnableComment()) return; + $oEditorModel = &getModel('editor'); return $oEditorModel->getModuleEditor('comment', $this->get('module_srl'), $comment_srl, 'comment_srl', 'content'); }