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