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