本文整理匯總了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;
}
}