コード例 #1
0
ファイル: htraininglog.php プロジェクト: hogeh/htraininglogs
 /**
  * Method to test whether a record can be deleted.
  *
  * @param   object  $record  A record object.
  *
  * @return  boolean  True if allowed to change the state of the record. Defaults to the permission for the component.
  *
  * @since   1.6
  */
 protected function canEditState($record)
 {
     if (!empty($record->catid)) {
         return JFactory::getUser()->authorise('core.edit.state', 'com_htraininglogs.category.' . (int) $record->catid);
     }
     return parent::canEditState($record);
 }
コード例 #2
0
ファイル: discount.php プロジェクト: Shtier/digicom
 /**
  * Method to test whether a record can be deleted.
  *
  * @param   object  $record  A record object.
  *
  * @return  boolean  True if allowed to change the state of the record. Defaults to the permission for the component.
  *
  * @since   1.0.0
  */
 protected function canEditState($record)
 {
     if (!empty($record->catid)) {
         return JFactory::getUser()->authorise('core.edit.state', 'com_digicom.discount.' . (int) $record->catid);
     }
     return parent::canEditState($record);
 }
コード例 #3
0
ファイル: item.php プロジェクト: mined-gatech/hubzero-cms
 /**
  * Method to test whether a record can have its state edited.
  *
  * @param	object	A record object.
  *
  * @return	boolean	True if allowed to change the state of the record. Defaults to the permission set in the component.
  * @since	1.6
  */
 protected function canEditState($record)
 {
     if (!empty($record->id)) {
         return User::authorise('core.edit.state', 'com_menus.item.' . (int) $record->id);
     } else {
         return parent::canEditState($record);
     }
 }
コード例 #4
0
ファイル: contag.php プロジェクト: smhnaji/sdnet
 /**
  * Method to test whether a record can have its state edited.
  *
  * @param   object  $record  A record object.
  *
  * @return  boolean  True if allowed to change the state of the record. Defaults to the permission set in the component.
  *
  * @since   1.6
  */
 protected function canEditState($record)
 {
     $permissions = SibdietHelper::getUserPermissions();
     if (in_array('contags', $permissions)) {
         return parent::canEditState($record);
     }
     return false;
 }
コード例 #5
0
ファイル: setdiet.php プロジェクト: smhnaji/sdnet
 /**
  * Method to test whether a record can have its state edited.
  *
  * @param   object  $record  A record object.
  *
  * @return  boolean  True if allowed to change the state of the record. Defaults to the permission set in the component.
  *
  * @since   1.6
  */
 protected function canEditState($record)
 {
     $permissions = SibdietHelper::getUserPermissions();
     // Check requests manage permission first.
     if (in_array('setdiets', $permissions)) {
         return parent::canEditState($record);
     }
     return false;
 }
コード例 #6
0
 protected function canEditState($record)
 {
     $user = JFactory::getUser();
     if ($record->imgid) {
         return $user->authorise('core.edit.state', 'com_phocagallery.phocagallerycoimg.' . (int) $record->imgid);
     } else {
         return parent::canEditState($record);
     }
 }
コード例 #7
0
ファイル: widget.php プロジェクト: juanferden/adoperp
 protected function canEditState($record)
 {
     $user = JFactory::getUser();
     if (!empty($record->id)) {
         return $user->authorise('core.edit.state', 'com_bt_socialconnect.widget.' . (int) $record->id);
     } else {
         return parent::canEditState('com_bt_socialconnect');
     }
 }
コード例 #8
0
ファイル: page.php プロジェクト: sankam-nikolya/lptt
 /**
  * Method to test whether a record can be deleted.
  *
  * @param   object  $record  A record object.
  *
  * @return  boolean  True if allowed to change the state of the record. Defaults to the permission for the component.
  *
  * @since   1.6
  */
 protected function canEditState($record)
 {
     $user = JFactory::getUser();
     if (!empty($record->id)) {
         return $user->authorise('core.edit.state', 'com_azurapagebuilder.page.' . (int) $record->id);
     } else {
         return parent::canEditState($record);
     }
 }
コード例 #9
0
 protected function canEditState($record)
 {
     $user = JFactory::getUser();
     /*if (!empty($record->catid)) {
     			return $user->authorise('core.edit.state', 'com_phocagallery.phocagalleryuser');
     		} else {*/
     return parent::canEditState($record);
     //}
 }
コード例 #10
0
ファイル: faq.php プロジェクト: bubujie/xixia
 /**
  * Method to test whether a record can have its state changed.
  *
  * @param	object	A record object.
  * @return	boolean	True if allowed to change the state of the record. Defaults to the permission set in the component.
  * @since	1.6
  */
 protected function canEditState($record)
 {
     $user = JFactory::getUser();
     if (!empty($record->catid)) {
         return $user->authorise('core.edit.state', 'com_faqs.category.' . (int) $record->catid);
     } else {
         return parent::canEditState($record);
     }
 }
コード例 #11
0
ファイル: message.php プロジェクト: juanferden/adoperp
 protected function canEditState($record)
 {
     $user = JFactory::getUser();
     // Check for existing article.
     if (!empty($record->id)) {
         return $user->authorise('core.edit.state', 'com_bt_socialconnect.message.' . (int) $record->id);
     } else {
         return parent::canEditState('com_bt_socialconnect');
     }
 }
コード例 #12
0
ファイル: album.php プロジェクト: ngxuanmui/hp3
 /**
  * Method to test whether a record can have its state changed.
  *
  * @param   object  $record  A record object.
  *
  * @return  boolean  True if allowed to change the state of the record. Defaults to the permission set in the component.
  *
  * @since   1.6
  */
 protected function canEditState($record)
 {
     $user = JFactory::getUser();
     // Check against the category.
     if (!empty($record->catid)) {
         return $user->authorise('core.edit.state', 'com_jnt_hanhphuc.category.' . (int) $record->catid);
     } else {
         return parent::canEditState($record);
     }
 }
コード例 #13
0
ファイル: field.php プロジェクト: ranrolls/ras-full-portal
 protected function canEditState($record)
 {
     $user = JFactory::getUser();
     if (!empty($record->id)) {
         return $user->authorise('core.edit.state', 'com_judirectory.field.' . $record->id);
     } elseif (!empty($record->group_id)) {
         return $user->authorise('core.edit.state', 'com_judirectory.fieldgroup.' . (int) $record->group_id);
     } else {
         return parent::canEditState($record);
     }
 }
コード例 #14
0
ファイル: document.php プロジェクト: abdullah929/bulletin
 /**
  * Method to test whether a record can be deleted.
  *
  * @param JForm $record a record object.
  * @return boolean True if allowed to change the state of the record. Defaults to the permission set in the component.
  */
 protected function canEditState($record)
 {
     if (!empty($record)) {
         if ($record instanceof JForm) {
             return JoomDOCAccessDocument::editState($record->getValue('id'), $record->getValue('checked_out'), $record->getValue('path'));
         } else {
             return JoomDOCAccessDocument::editState($record->id, $record->checked_out, $record->path);
         }
     }
     return parent::canEditState($record);
 }
コード例 #15
0
ファイル: visdata.php プロジェクト: shamusdougan/GDMCWebsite
 /**
  * Method to test whether a record state can be changed.
  *
  * @param   object  $record  A record object.
  *
  * @return  boolean  True if allowed to change the state of the record. Defaults to the permission for the component.
  *
  * @since   11.1
  */
 protected function canEditState($record)
 {
     $user = JFactory::getUser();
     $fid = JFactory::getApplication()->input->getInt('fid', -1);
     // Check form settings.
     if ($fid != -1) {
         return $user->authorise('core.edit.state', 'com_visforms.visform.' . (int) $fid);
     } else {
         return parent::canEditState($record);
     }
 }
コード例 #16
0
ファイル: article.php プロジェクト: Joomla-on-NoSQL/LaMojo
 /**
  * Method to test whether a record can be deleted.
  *
  * @param	object	$record	A record object.
  *
  * @return	boolean	True if allowed to change the state of the record. Defaults to the permission set in the component.
  * @since	1.6
  */
 protected function canEditState($record)
 {
     $user = JFactory::getUser();
     // Check for existing article.
     if (!empty($record->id)) {
         return $user->authorise('core.edit.state', 'com_content.article.' . (int) $record->id);
     } else {
         if (!empty($record->catid)) {
             return $user->authorise('core.edit.state', 'com_content.category.' . (int) $record->catid);
         } else {
             return parent::canEditState($record);
         }
     }
 }
コード例 #17
0
ファイル: post.php プロジェクト: site4com/acts
 /**
  * Method to test whether a record can have its state changed.
  *
  * @param
  *        	object A record object.
  * @return boolean True if allowed to change the state of the record. Defaults to the permission set in the component.
  * @since 1.6
  */
 protected function canEditState($record)
 {
     $user = JFactory::getUser();
     if (!empty($record->catid)) {
         $canEditState = $user->authorise('core.edit.state', 'com_edashboard.category.' . (int) $record->catid);
     } else {
         $canEditState = parent::canEditState($record);
     }
     // ABP: Additional check on pub dates: deny if published, only superadmin can change
     if ($canEditState && !$user->authorise('core.admin') && $record->id) {
         $item = $this->getItem($record->id);
         $canEditState = !$this->isPublished($item);
     }
     return $canEditState;
 }
コード例 #18
0
ファイル: directory.php プロジェクト: eno93/Projectfork
 /**
  * Method to test whether a record can have its state edited.
  * Defaults to the permission set in the component.
  *
  * @param     object     A record object.
  *
  * @return    boolean    True if allowed to delete the record.
  */
 protected function canEditState($record)
 {
     $user = JFactory::getUser();
     // Check for existing item.
     if (!empty($record->id)) {
         return $user->authorise('core.edit.state', 'com_pfrepo.directory.' . (int) $record->id);
     } elseif (!empty($record->parent_id)) {
         // New item, so check against the parent dir.
         return $user->authorise('core.edit.state', 'com_pfrepo.directory.' . (int) $record->parent_id);
     } else {
         // Default to component settings.
         return parent::canEditState('com_pfrepo');
     }
 }
コード例 #19
0
ファイル: article.php プロジェクト: GitIPFire/Homeworks
	/**
	 * Method to test whether a record can have its state edited.
	 *
	 * @param   object    $record    A record object.
	 *
	 * @return  boolean  True if allowed to change the state of the record. Defaults to the permission set in the component.
	 * @since   1.6
	 */
	protected function canEditState($record)
	{
		$user = JFactory::getUser();

		// Check for existing article.
		if (!empty($record->id))
		{
			return $user->authorise('core.edit.state', 'com_content.article.' . (int) $record->id);
		}
		// New article, so check against the category.
		elseif (!empty($record->catid))
		{
			return $user->authorise('core.edit.state', 'com_content.category.' . (int) $record->catid);
		}
		// Default to component settings if neither article nor category known.
		else
		{
			return parent::canEditState('com_content');
		}
	}
コード例 #20
0
 /**
  * Method to test whether a record can have its state edited.
  * Defaults to the permission set in the component.
  *
  * @param     object     A record object.
  *
  * @return    boolean    True if allowed to delete the record.
  */
 protected function canEditState($record)
 {
     if (empty($record->id)) {
         return parent::canEditState($record);
     }
     $user = JFactory::getUser();
     if (!$user->authorise('core.admin') && !in_array($record->access, $user->getAuthorisedViewLevels())) {
         return false;
     }
     return $user->authorise('core.edit.state', 'com_pftasks.tasklist.' . (int) $record->id);
 }
コード例 #21
0
 /**
  * Method to test whether a record can have its state edited.
  * Defaults to the permission set in the component.
  *
  * @param     object     A record object.
  *
  * @return    boolean    True if allowed to delete the record.
  */
 protected function canEditState($record)
 {
     if (!empty($record->id)) {
         $user = JFactory::getUser();
         $asset = 'com_pfcomments.comment.' . (int) $record->id;
         return $user->authorise('core.edit', $asset) || $user->authorise('core.edit.own', $asset) && $record->created_by == $user->id;
     }
     return parent::canEditState($record);
 }
コード例 #22
0
ファイル: category.php プロジェクト: kosmosby/medicine-prof
 protected function canEditState($record)
 {
     $user = JFactory::getUser();
     $rootCategory = JUDownloadFrontHelperCategory::getRootCategory();
     if ($record->id && $record->id == $rootCategory->id) {
         return false;
     }
     if (!empty($record->id)) {
         return $user->authorise('judl.category.edit.state', 'com_judownload.category.' . (int) $record->id);
     } elseif (!empty($record->parent_id)) {
         return $user->authorise('judl.category.edit.state', 'com_judownload.category.' . (int) $record->parent_id);
     } else {
         return parent::canEditState($record);
     }
 }
コード例 #23
0
 protected function canEditState($record)
 {
     return parent::canEditState($record);
 }
コード例 #24
0
 protected function canEditState($record)
 {
     //$user = JFactory::getUser();
     return parent::canEditState($record);
 }
コード例 #25
0
ファイル: contact.php プロジェクト: Rai-Ka/joomla-cms
 /**
  * Method to test whether a record can have its state edited.
  *
  * @param   object  $record  A record object.
  *
  * @return  boolean  True if allowed to change the state of the record. Defaults to the permission set in the component.
  *
  * @since   1.6
  */
 protected function canEditState($record)
 {
     // Check against the category.
     if (!empty($record->catid)) {
         return JFactory::getUser()->authorise('core.edit.state', 'com_contact.category.' . (int) $record->catid);
     }
     // Default to component settings if category not known.
     return parent::canEditState($record);
 }
コード例 #26
0
ファイル: comment.php プロジェクト: kosmosby/medicine-prof
 protected function canEditState($record)
 {
     $rootComment = JUDownloadFrontHelperComment::getRootComment();
     if (isset($record->id) && $record->id == $rootComment->id) {
         return false;
     }
     $app = JFactory::getApplication();
     if ($app->isSite()) {
         $modCanEditState = JUDownloadFrontHelperModerator::checkModeratorCanDoWithComment($record->id, 'comment_edit_state');
         if ($modCanEditState) {
             return true;
         }
         return false;
     }
     return parent::canEditState($record);
 }
コード例 #27
0
 /**
  * Method to test whether a record can have its state edited.
  *
  * @param   object  $record  A record object.
  *
  * @return  boolean  True if allowed to change the state of the record. Defaults to the permission set in the component.
  *
  * @since   1.6
  */
 protected function canEditState($record)
 {
     $user = JFactory::getUser();
     $recordId = !empty($record->id) ? $record->id : 0;
     if ($recordId) {
         // The record has been set. Check the record permissions.
         $permission = $user->authorise('core.edit.state', 'com_componentbuilder.custom_admin_view.' . (int) $recordId);
         if (!$permission && !is_null($permission)) {
             return false;
         }
     }
     // In the absense of better information, revert to the component permissions.
     return parent::canEditState($record);
 }
コード例 #28
0
ファイル: module.php プロジェクト: Rai-Ka/joomla-cms
 /**
  * Method to test whether a record can have its state edited.
  *
  * @param   object  $record  A record object.
  *
  * @return  boolean  True if allowed to change the state of the record. Defaults to the permission set in the component.
  *
  * @since   3.2
  */
 protected function canEditState($record)
 {
     $user = JFactory::getUser();
     // Check for existing module.
     if (!empty($record->id)) {
         return $user->authorise('core.edit.state', 'com_modules.module.' . (int) $record->id);
     } else {
         return parent::canEditState('com_modules');
     }
 }
コード例 #29
0
ファイル: teamnaam.php プロジェクト: esorone/efcpw
 /**
  * Method to test whether a record can have its state changed.
  *
  * @param	object	A record object.
  * @return	boolean	True if allowed to change the state of the record. Defaults to the permission set in the component.
  */
 protected function canEditState($record)
 {
     $user = JFactory::getUser();
     // Check against the id.
     if (!empty($record->id)) {
         return $user->authorise('core.edit.state', 'com_knvbapi2.teamnaam.' . (int) $record->id);
     } else {
         // New teamnaam, so check against the category.
         if (!empty($record->catid)) {
             return $user->authorise('core.edit.state', 'com_knvbapi2.category.' . (int) $record->catid);
         } else {
             // Default to component settings.
             return parent::canEditState($record);
         }
     }
 }
コード例 #30
0
ファイル: album.php プロジェクト: MrJookie/pm
 /**
  * Method to test whether a record can have its state edited.
  * Defaults to the permission set in the component.
  *
  * @param     object     A record object.
  *
  * @return    boolean    True if allowed to edit the state of the record.
  */
 protected function canEditState($record)
 {
     if (!empty($record->id)) {
         $user = JFactory::getUser();
         $asset = 'com_pfdesigns.album.' . (int) $record->id;
         return $user->authorise('core.edit.state', $asset);
     }
     return parent::canEditState($record);
 }