本文整理汇总了PHP中Users_Privileges_Model::getSharedOwner方法的典型用法代码示例。如果您正苦于以下问题:PHP Users_Privileges_Model::getSharedOwner方法的具体用法?PHP Users_Privileges_Model::getSharedOwner怎么用?PHP Users_Privileges_Model::getSharedOwner使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Users_Privileges_Model
的用法示例。
在下文中一共展示了Users_Privileges_Model::getSharedOwner方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isPermitted
//.........这里部分代码省略.........
$permission = "no";
$log->debug("Exiting isPermitted method ...");
return $permission;
}
//Checking for Action Permission
if (strlen($profileActionPermission[$tabid][$actionid]) < 1 && $profileActionPermission[$tabid][$actionid] == '') {
$permission = "yes";
$log->debug("Exiting isPermitted method ...");
return $permission;
}
if ($profileActionPermission[$tabid][$actionid] != 0 && $profileActionPermission[$tabid][$actionid] != '') {
$permission = "no";
$log->debug("Exiting isPermitted method ...");
return $permission;
}
//Checking and returning true if recorid is null
if ($record_id == '') {
$permission = "yes";
$log->debug("Exiting isPermitted method ...");
return $permission;
}
//If modules is Products,Vendors,Faq,PriceBook then no sharing
if ($record_id != '') {
if (getTabOwnedBy($module) == 1) {
$permission = "yes";
$log->debug("Exiting isPermitted method ...");
return $permission;
}
}
//Retreiving the RecordOwnerId
$recOwnType = '';
$recOwnId = '';
$recordOwnerArr = getRecordOwnerId($record_id);
$shownerids = Users_Privileges_Model::getSharedOwner($record_id);
foreach ($recordOwnerArr as $type => $id) {
$recOwnType = $type;
$recOwnId = $id;
}
//Retreiving the default Organisation sharing Access
$others_permission_id = $defaultOrgSharingPermission[$tabid];
if ($recOwnType == 'Users') {
//Checking if the Record Owner is the current User
if ($current_user->id == $recOwnId || in_array($current_user->id, $shownerids)) {
$permission = "yes";
$log->debug("Exiting isPermitted method ...");
return $permission;
}
//Checking if the Record Owner is the Subordinate User
foreach ($subordinate_roles_users as $roleid => $userids) {
if (in_array($recOwnId, $userids)) {
$permission = 'yes';
if ($module == 'Calendar') {
$permission = isCalendarPermittedBySharing($record_id);
}
$log->debug("Exiting isPermitted method ...");
return $permission;
}
}
} elseif ($recOwnType == 'Groups') {
//Checking if the record owner is the current user's group
if (in_array($recOwnId, $current_user_groups)) {
$permission = 'yes';
$log->debug("Exiting isPermitted method ...");
return $permission;
}
}