当前位置: 首页>>代码示例>>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;未经允许,请勿转载。