Exemplo n.º 1
0
 /**
  * Generic authorize handler for controller delete actions
  *
  * @return  boolean     Can return both true or false.
  */
 public function canDelete()
 {
     $result = false;
     if (parent::canDelete()) {
         return get_viwer()->admin();
     }
     return $result;
 }
Exemplo n.º 2
0
 /**
  * Generic authorize handler for controller delete actions
  * 
  * @return  boolean     Can return both true or false.  
  */
 public function canDelete()
 {
     $result = false;
     if (parent::canDelete()) {
         if (version_compare(JVERSION, '1.6.0', 'ge')) {
             $result = JFactory::getUser()->authorise('core.delete');
         } else {
             $result = JFactory::getUser()->get('gid') > 22;
         }
     }
     return $result;
 }