當前位置: 首頁>>代碼示例>>PHP>>正文


PHP SugarBean::listviewACLHelper方法代碼示例

本文整理匯總了PHP中SugarBean::listviewACLHelper方法的典型用法代碼示例。如果您正苦於以下問題:PHP SugarBean::listviewACLHelper方法的具體用法?PHP SugarBean::listviewACLHelper怎麽用?PHP SugarBean::listviewACLHelper使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在SugarBean的用法示例。


在下文中一共展示了SugarBean::listviewACLHelper方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: listviewACLHelper

 /**
  * Extends SugarBean::listviewACLHelper
  *
  * @return array
  */
 public function listviewACLHelper()
 {
     $array_assign = parent::listviewACLHelper();
     $is_owner = false;
     if (!ACLController::moduleSupportsACL('Accounts') || ACLController::checkAccess('Accounts', 'view', $is_owner)) {
         $array_assign['ACCOUNT'] = 'a';
     } else {
         $array_assign['ACCOUNT'] = 'span';
     }
     return $array_assign;
 }
開發者ID:omusico,項目名稱:sugar_work,代碼行數:16,代碼來源:UsersLastImport.php

示例2: listviewACLHelper

 function listviewACLHelper()
 {
     $array_assign = parent::listviewACLHelper();
     $is_owner = false;
     if (!empty($this->parent_name)) {
         if (!empty($this->parent_name_owner)) {
             global $current_user;
             $is_owner = $current_user->id == $this->parent_name_owner;
         }
     }
     if (!ACLController::moduleSupportsACL($this->parent_type) || ACLController::checkAccess($this->parent_type, 'view', $is_owner)) {
         $array_assign['PARENT'] = 'a';
     } else {
         $array_assign['PARENT'] = 'span';
     }
     $is_owner = false;
     if (!empty($this->contact_name)) {
         if (!empty($this->contact_name_owner)) {
             global $current_user;
             $is_owner = $current_user->id == $this->contact_name_owner;
         }
     }
     if (ACLController::checkAccess('Contacts', 'view', $is_owner)) {
         $array_assign['CONTACT'] = 'a';
     } else {
         $array_assign['CONTACT'] = 'span';
     }
     return $array_assign;
 }
開發者ID:rgauss,項目名稱:sugarcrm_dev,代碼行數:29,代碼來源:Email.php

示例3: listviewACLHelper

 function listviewACLHelper()
 {
     $array_assign = parent::listviewACLHelper();
     $is_owner = false;
     $in_group = false;
     //SECURITY GROUPS
     if (!empty($this->parent_name)) {
         if (!empty($this->parent_name_owner)) {
             global $current_user;
             $is_owner = $current_user->id == $this->parent_name_owner;
         } else {
             if (!empty($this->parent_type) && !empty($this->parent_id)) {
                 global $current_user;
                 $parent_bean = BeanFactory::getBean($this->parent_type, $this->parent_id);
                 if ($parent_bean !== false) {
                     $is_owner = $current_user->id == $parent_bean->assigned_user_id;
                 }
             }
         }
         require_once "modules/SecurityGroups/SecurityGroup.php";
         $in_group = SecurityGroup::groupHasAccess($this->parent_type, $this->parent_id, 'view');
         /* END - SECURITY GROUPS */
     }
     /* BEGIN - SECURITY GROUPS */
     /**
     if(!ACLController::moduleSupportsACL($this->parent_type) || ACLController::checkAccess($this->parent_type, 'view', $is_owner)){
     */
     if (!ACLController::moduleSupportsACL($this->parent_type) || ACLController::checkAccess($this->parent_type, 'view', $is_owner, 'module', $in_group)) {
         /* END - SECURITY GROUPS */
         $array_assign['PARENT'] = 'a';
     } else {
         $array_assign['PARENT'] = 'span';
     }
     $is_owner = false;
     $in_group = false;
     //SECURITY GROUPS
     if (!empty($this->contact_name)) {
         if (!empty($this->contact_name_owner)) {
             global $current_user;
             $is_owner = $current_user->id == $this->contact_name_owner;
         } else {
             global $current_user;
             $parent_bean = BeanFactory::getBean('Contacts', $this->contact_id);
             if ($parent_bean !== false) {
                 $is_owner = $current_user->id == $parent_bean->assigned_user_id;
             }
         }
         require_once "modules/SecurityGroups/SecurityGroup.php";
         $in_group = SecurityGroup::groupHasAccess('Contacts', $this->contact_id, 'view');
         /* END - SECURITY GROUPS */
     }
     /* BEGIN - SECURITY GROUPS */
     /**
     if( ACLController::checkAccess('Contacts', 'view', $is_owner)){
     */
     if (ACLController::checkAccess('Contacts', 'view', $is_owner, 'module', $in_group)) {
         /* END - SECURITY GROUPS */
         $array_assign['CONTACT'] = 'a';
     } else {
         $array_assign['CONTACT'] = 'span';
     }
     return $array_assign;
 }
開發者ID:sacredwebsite,項目名稱:SuiteCRM,代碼行數:63,代碼來源:Task.php

示例4: listviewACLHelper

 function listviewACLHelper()
 {
     $array_assign = parent::listviewACLHelper();
     $is_owner = false;
     if (!empty($this->account_id)) {
         if (!empty($this->account_id_owner)) {
             global $current_user;
             $is_owner = $current_user->id == $this->account_id_owner;
         }
     }
     if (!ACLController::moduleSupportsACL('Accounts') || ACLController::checkAccess('Accounts', 'view', $is_owner)) {
         $array_assign['ACCOUNT'] = 'a';
     } else {
         $array_assign['ACCOUNT'] = 'span';
     }
     return $array_assign;
 }
開發者ID:BackupTheBerlios,項目名稱:livealphaprint,代碼行數:17,代碼來源:Case.php

示例5: listviewACLHelper

 function listviewACLHelper()
 {
     $array_assign = parent::listviewACLHelper();
     $is_owner = false;
     if (!empty($this->parent_name)) {
         if (!empty($this->parent_name_owner)) {
             global $current_user;
             $is_owner = $current_user->id == $this->parent_name_owner;
         }
     }
     if (ACLController::checkAccess('Project', 'view', $is_owner)) {
         $array_assign['PARENT'] = 'a';
     } else {
         $array_assign['PARENT'] = 'span';
     }
     $is_owner = false;
     if (!empty($this->depends_on_name)) {
         if (!empty($this->depends_on_name_owner)) {
             global $current_user;
             $is_owner = $current_user->id == $this->depends_on_name_owner;
         }
     }
     if (ACLController::checkAccess('ProjectTask', 'view', $is_owner)) {
         $array_assign['PARENT_TASK'] = 'a';
     } else {
         $array_assign['PARENT_TASK'] = 'span';
     }
     return $array_assign;
 }
開發者ID:omusico,項目名稱:sugar_work,代碼行數:29,代碼來源:ProjectTask.php

示例6: listviewACLHelper

 /**
  * {@inheritdoc}
  */
 public function listviewACLHelper()
 {
     $array_assign = parent::listviewACLHelper();
     $is_owner = false;
     if (!empty($this->contact_name)) {
         if (!empty($this->contact_name_owner)) {
             global $current_user;
             $is_owner = $current_user->id == $this->contact_name_owner;
         }
     }
     if (ACLController::checkAccess('Contacts', 'view', $is_owner)) {
         $array_assign['CONTACT'] = 'a';
     } else {
         $array_assign['CONTACT'] = 'span';
     }
     $is_owner = false;
     if (!empty($this->account_name)) {
         if (!empty($this->account_name_owner)) {
             global $current_user;
             $is_owner = $current_user->id == $this->account_name_owner;
         }
     }
     if (ACLController::checkAccess('Accounts', 'view', $is_owner)) {
         $array_assign['ACCOUNT'] = 'a';
     } else {
         $array_assign['ACCOUNT'] = 'span';
     }
     $is_owner = false;
     if (!empty($this->quote_name)) {
         if (!empty($this->quote_name_owner)) {
             global $current_user;
             $is_owner = $current_user->id == $this->quote_name_owner;
         }
     }
     if (ACLController::checkAccess('Quotes', 'view', $is_owner)) {
         $array_assign['QUOTE'] = 'a';
     } else {
         $array_assign['QUOTE'] = 'span';
     }
     return $array_assign;
 }
開發者ID:jglaine,項目名稱:sugar761-ent,代碼行數:44,代碼來源:RevenueLineItem.php

示例7: listviewACLHelper

 function listviewACLHelper()
 {
     $array_assign = parent::listviewACLHelper();
     $is_owner = false;
     if (!empty($this->name)) {
         if (!empty($this->opportunity_owner)) {
             global $current_user;
             $is_owner = $current_user->id == $this->opportunity_owner;
         }
     }
     if (ACLController::checkAccess('Opportunities', 'view', $is_owner)) {
         $array_assign['OPPORTUNITY'] = 'a';
     } else {
         $array_assign['OPPORTUNITY'] = 'span';
     }
     return $array_assign;
 }
開發者ID:jglaine,項目名稱:sugar761-ent,代碼行數:17,代碼來源:ForecastOpportunities.php

示例8: listviewACLHelper

 public function listviewACLHelper()
 {
     global $current_user;
     $array_assign = parent::listviewACLHelper();
     $is_owner = false;
     if (!empty($this->shipping_account_name)) {
         if (!empty($this->shipping_account_name_owner)) {
             $is_owner = $current_user->id == $this->shipping_account_name_owner;
         }
     }
     if (ACLController::checkAccess('Accounts', 'view', $is_owner)) {
         $array_assign['SHIPPING_ACCOUNT'] = 'a';
     } else {
         $array_assign['SHIPPING_ACCOUNT'] = 'span';
     }
     $is_owner = false;
     if (!empty($this->billing_account_name)) {
         if (!empty($this->billing_account_name_owner)) {
             $is_owner = $current_user->id == $this->billing_account_name_owner;
         }
     }
     if (ACLController::checkAccess('Accounts', 'view', $is_owner)) {
         $array_assign['BILLING_ACCOUNT'] = 'a';
     } else {
         $array_assign['BILLING_ACCOUNT'] = 'span';
     }
     $is_owner = false;
     if (!empty($this->shipping_contact_name)) {
         if (!empty($this->shipping_contact_name_owner)) {
             $is_owner = $current_user->id == $this->shipping_contact_name_owner;
         }
     }
     if (ACLController::checkAccess('Contacts', 'view', $is_owner)) {
         $array_assign['SHIPPING_CONTACT'] = 'a';
     } else {
         $array_assign['SHIPPING_CONTACT'] = 'span';
     }
     $is_owner = false;
     if (!empty($this->billing_contact_name)) {
         if (!empty($this->billing_contact_name_owner)) {
             $is_owner = $current_user->id == $this->billing_contact_name_owner;
         }
     }
     if (ACLController::checkAccess('Contacts', 'view', $is_owner)) {
         $array_assign['BILLING_CONTACT'] = 'a';
     } else {
         $array_assign['BILLING_CONTACT'] = 'span';
     }
     $is_owner = false;
     if (!empty($this->opportunity_name)) {
         if (!empty($this->opportunity_name_owner)) {
             $is_owner = $current_user->id == $this->opportunity_name_owner;
         }
     }
     if (ACLController::checkAccess('Opportunities', 'view', $is_owner)) {
         $array_assign['OPPORTUNITY'] = 'a';
     } else {
         $array_assign['OPPORTUNITY'] = 'span';
     }
     return $array_assign;
 }
開發者ID:jglaine,項目名稱:sugar761-ent,代碼行數:61,代碼來源:Quote.php

示例9: listviewACLHelper

	function listviewACLHelper(){
		$array_assign = parent::listviewACLHelper();
		$is_owner = false;
		$in_group = false; //SECURITY GROUPS
		if(!empty($this->parent_name)){

			if(!empty($this->parent_name_owner)){
				global $current_user;
				$is_owner = $current_user->id == $this->parent_name_owner;
			}
			/* BEGIN - SECURITY GROUPS */
			//parent_name_owner not being set for whatever reason so we need to figure this out
			else if(!empty($this->parent_type) && !empty($this->parent_id)) {
				global $current_user;
                $parent_bean = BeanFactory::getBean($this->parent_type,$this->parent_id);
                if($parent_bean !== false) {
                	$is_owner = $current_user->id == $parent_bean->assigned_user_id;
                }
			}
			require_once("modules/SecurityGroups/SecurityGroup.php");
			$in_group = SecurityGroup::groupHasAccess($this->parent_type, $this->parent_id, 'view'); 
        	/* END - SECURITY GROUPS */
		}
			/* BEGIN - SECURITY GROUPS */
			/**
			if(ACLController::checkAccess('Project', 'view', $is_owner)){
			*/
			if(ACLController::checkAccess('Project', 'view', $is_owner, 'module', $in_group)){
        	/* END - SECURITY GROUPS */
				$array_assign['PARENT'] = 'a';
			}else{
				$array_assign['PARENT'] = 'span';
			}
		$is_owner = false;
		if(!empty($this->depends_on_name)){

			if(!empty($this->depends_on_name_owner)){
				global $current_user;
				$is_owner = $current_user->id == $this->depends_on_name_owner;
			}
		}
			if( ACLController::checkAccess('ProjectTask', 'view', $is_owner)){
				$array_assign['PARENT_TASK'] = 'a';
			}else{
				$array_assign['PARENT_TASK'] = 'span';
			}

		return $array_assign;
	}
開發者ID:eggsurplus,項目名稱:SuiteCRM,代碼行數:49,代碼來源:ProjectTask.php


注:本文中的SugarBean::listviewACLHelper方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。