_viewPath .= 'front/'; $this->_viewDatas['layout'] = LAYOUTS['front']; } final protected function getCategoryModel(): CategoryModel { return $this->_categoryModel = $this->_categoryModel ?: new CategoryModel(); } //권한체크 final protected function isRole($action, $entity = null) { $this->_category = !is_null($entity) ? $entity->getCategory_Uid() : ($this->request->getVar('category') ?: throw new \Exception("범주를 지정하지 않으셨습니다.")); $this->_viewDatas['category'] = $this->getCategoryModel()->getEntity([$this->getCategoryModel()->getPrimaryKey() => $this->_category]); $categorys = $this->getCategoryModel()->getSiblingEntitys($this->_viewDatas['category']); $this->_viewDatas['parent_category'] = array_shift($categorys); $this->_viewDatas['sibling_categorys'] = $categorys; switch ($action) { case 'insert': $category_field = CATEGORY_ROLE_FIELDS['WRITE']; break; case 'reply': $category_field = CATEGORY_ROLE_FIELDS['REPLY']; break; case 'view': $category_field = CATEGORY_ROLE_FIELDS['READ']; break; case 'upload': $category_field = CATEGORY_ROLE_FIELDS['UPLOAD']; break; case 'download': $category_field = CATEGORY_ROLE_FIELDS['DONWLOAD']; break; default: $category_field = CATEGORY_ROLE_FIELDS['ACCESS']; break; } //사용자가 Category에서 해당 게시판의 해당권한이 있는지 확인 if (!isRole_CommonHelper( $this->_viewDatas['currentRoles'], $this->_viewDatas['category'], $category_field, )) { // echo var_export($this->_viewDatas['currentRoles'], true); // echo "