本文整理匯總了PHP中Basic::listviewACLHelper方法的典型用法代碼示例。如果您正苦於以下問題:PHP Basic::listviewACLHelper方法的具體用法?PHP Basic::listviewACLHelper怎麽用?PHP Basic::listviewACLHelper使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Basic
的用法示例。
在下文中一共展示了Basic::listviewACLHelper方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: 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;
}
示例2: listviewACLHelper
function listviewACLHelper()
{
$array_assign = parent::listviewACLHelper();
$is_owner = false;
$in_group = false;
//SECURITY GROUPS
if (!empty($this->account_id)) {
if (!empty($this->account_id_owner)) {
global $current_user;
$is_owner = $current_user->id == $this->account_id_owner;
} else {
global $current_user;
$parent_bean = BeanFactory::getBean('Accounts', $this->account_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('Accounts', $this->account_id, 'view');
/* END - SECURITY GROUPS */
}
/* BEGIN - SECURITY GROUPS */
/**
if(!ACLController::moduleSupportsACL('Accounts') || ACLController::checkAccess('Accounts', 'view', $is_owner)){
*/
if (!ACLController::moduleSupportsACL('Accounts') || ACLController::checkAccess('Accounts', 'view', $is_owner, 'module', $in_group)) {
/* END - SECURITY GROUPS */
$array_assign['ACCOUNT'] = 'a';
} else {
$array_assign['ACCOUNT'] = 'span';
}
return $array_assign;
}