本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}