system/modules/DocumentManagementSystem/dca/tl_dms_categories.php
public function checkPermission()
  {
    // Check current action
    switch ($this->Input->get('act'))
    {
      case 'delete':
        if (!$this->isCategoryDeletable($this->Input->get('id')))
        {
          $this->log('Deleting the non empty category with ID "'.$this->Input->get('id').'" is not allowed.', 'tl_dms_categories checkPermission', TL_ERROR);
          $this->redirect('contao/main.php?act=error');
        }
        break;
    }
  }
public function checkPermission()
  {
    // Check current action
    switch ($this->Input->get('act'))
    {
      case 'delete':
        if (!$this->isCategoryDeletable($this->Input->get('id')))
        {
          $this->log('Deleting the non empty category with ID "'.$this->Input->get('id').'" is not allowed.', 'tl_dms_categories checkPermission', TL_ERROR);
          $this->redirect('contao/main.php?act=error');
        }
        break;
    }
  }
public function checkPermission ( ) { // Check current action switch ( $ this -> Input -> get ( 'act' ) ) { case 'delete' : if ( ! $ this -> isCategoryDeletable ( $ this -> Input -> get ( 'id' ) ) ) { $ this -> log ( 'Deleting the non empty category with ID "' . $ this -> Input -> get ( 'id' ) . '" is not allowed.' , 'tl_dms_categories checkPermission' , TL_ERROR ) ; $ this -> redirect ( 'contao/main.php?act=error' ) ; } break ; } }
Check permissions to avoid not allowd deleting
Check permissions to avoid not allowd deleting