servermgrv2 init...
This commit is contained in:
parent
fe170ead70
commit
23a9977c93
@ -66,13 +66,6 @@ class BoardController extends FrontController
|
||||
$this->isRole('insert');
|
||||
return parent::insert_form_process();
|
||||
}
|
||||
protected function insert_process()
|
||||
{
|
||||
//권한체크
|
||||
$this->isRole('insert');
|
||||
return parent::insert_process();
|
||||
}
|
||||
|
||||
//Update관련
|
||||
protected function update_form_process($entity)
|
||||
{
|
||||
@ -94,15 +87,9 @@ class BoardController extends FrontController
|
||||
protected function reply_form_process($entity)
|
||||
{
|
||||
//권한체크
|
||||
$this->isRole('reply');
|
||||
$this->isRole('reply', $entity);
|
||||
return parent::reply_form_process($entity);
|
||||
}
|
||||
protected function reply_process($entity)
|
||||
{
|
||||
//권한체크
|
||||
$this->isRole('reply');
|
||||
return parent::reply_process($entity);
|
||||
}
|
||||
//Delete 관련
|
||||
protected function delete_process($entity)
|
||||
{
|
||||
@ -116,7 +103,7 @@ class BoardController extends FrontController
|
||||
protected function view_process($entity)
|
||||
{
|
||||
//권한체크
|
||||
$this->isRole('view');
|
||||
$this->isRole('view', $entity);
|
||||
//조회수 올리기
|
||||
$this->_model->addViewCount($entity);
|
||||
return parent::view_process($entity);
|
||||
|
||||
@ -25,9 +25,9 @@ abstract class FrontController extends BaseController
|
||||
}
|
||||
|
||||
//권한체크
|
||||
final protected function isRole($action)
|
||||
final protected function isRole($action, $entity = null)
|
||||
{
|
||||
$this->_category = $this->request->getVar('category') ?: throw new \Exception("범주를 지정하지 않으셨습니다.");
|
||||
$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]);
|
||||
switch ($action) {
|
||||
case 'insert':
|
||||
|
||||
Loading…
Reference in New Issue
Block a user