示例#1
0
 /**
  * Method override to check if you can edit an existing record.
  *
  * @param	array	$data	An array of input data.
  * @param	string	$key	The name of the key for the primary key.
  *
  * @return	boolean
  * @since	1.6
  */
 protected function allowEdit($data = array(), $key = 'id')
 {
     // Check specific edit permission then general edit permission.
     return JFactory::getUser()->authorise('core.edit', 'com_fieldsattach.message.' . ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key);
 }
示例#2
0
 /**
  * Method override to check if you can edit an existing record.
  *
  * @param   array  $data An array of input data.
  * @param   string $key  The name of the key for the primary key.
  *
  * @return  boolean
  */
 protected function allowEdit($data = array(), $key = 'id')
 {
     // Initialise variables.
     $recordId = (int) isset($data[$key]) ? $data[$key] : 0;
     $user = JFactory::getUser();
     $userId = $user->get('id');
     // Check general edit permission first.
     if ($user->authorise('core.edit', 'com_modules.module.' . $recordId)) {
         return true;
     }
     // Since there is no asset tracking, revert to the component permissions.
     return parent::allowEdit($data, $key);
 }
示例#3
0
 /**
  * Method override to check if you can edit an existing record.
  *
  * @param	array	$data	An array of input data.
  * @param	string	$key	The name of the key for the primary key.
  *
  * @return	boolean
  * @since	1.7
  */
 protected function allowEdit($data = array(), $key = 'id')
 {
     // Check specific edit permission then general edit permission.
     return JFactory::getUser()->authorise('core.edit', 'com_jtrinitycore.powerleveling.' . ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key);
 }
示例#4
0
 protected function allowEdit($data = array(), $key = 'id')
 {
     return JFactory::getUser()->authorise('core.edit', 'com_ganalytics.profile.' . ((int) isset($data[$key]) ? $data[$key] : 0)) or parent::allowEdit($data, $key);
 }