本文整理汇总了PHP中CIBlockRights::GetRightsList方法的典型用法代码示例。如果您正苦于以下问题:PHP CIBlockRights::GetRightsList方法的具体用法?PHP CIBlockRights::GetRightsList怎么用?PHP CIBlockRights::GetRightsList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CIBlockRights
的用法示例。
在下文中一共展示了CIBlockRights::GetRightsList方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetAllowableOperations
public function GetAllowableOperations($documentType)
{
$iblockId = intval(substr($documentType, strlen("iblock_")));
if ($iblockId <= 0) {
throw new CBPArgumentOutOfRangeException("documentType", $documentType);
}
if (CIBlock::GetArrayByID($iblockId, "RIGHTS_MODE") === "E") {
$ob = new CIBlockRights($iblockId);
return $ob->GetRightsList();
}
return array("read" => GetMessage("IBD_OPERATION_READ"), "write" => GetMessage("IBD_OPERATION_WRITE"));
}
示例2: GetMessage
?>
<tr>
<td width="40%" class="adm-detail-valign-top"><label for="RIGHTS_MODE"><?php
echo GetMessage("IB_E_RIGHTS_MODE");
?>
</label></td>
<td width="60%">
<input type="hidden" name="RIGHTS_MODE" value="S">
<input type="checkbox" id="RIGHTS_MODE" name="RIGHTS_MODE" value="E" checked="checked"><?php
echo BeginNote(), GetMessage("IB_E_RIGHTS_MODE_NOTE1"), EndNote();
?>
</td>
</tr>
<?php
$obIBlockRights = new CIBlockRights($ID);
IBlockShowRights('iblock', $ID, $ID, GetMessage("IB_E_RIGHTS_SECTION_TITLE"), "RIGHTS", $obIBlockRights->GetRightsList(), $obIBlockRights->GetRights(array("count_overwrited" => true)), true);
?>
<tr>
<td colspan="2"> </td>
</tr>
<?php
} else {
?>
<tr>
<td width="40%" class="adm-detail-valign-top"><label for="RIGHTS_MODE"><?php
echo GetMessage("IB_E_RIGHTS_MODE");
?>
</label></td>
<td width="60%">
<input type="hidden" name="RIGHTS_MODE" value="S">
<input type="checkbox" id="RIGHTS_MODE" name="RIGHTS_MODE" value="E"><?php
示例3: GetMessage
<tr>
<td width="40%" class="adm-detail-valign-top"><label for="RIGHTS_MODE"><?echo GetMessage("IB_E_RIGHTS_MODE")?></label></td>
<td width="60%">
<input type="hidden" name="RIGHTS_MODE" value="S">
<input type="checkbox" id="RIGHTS_MODE" name="RIGHTS_MODE" value="E" checked="checked"><?echo BeginNote(), GetMessage("IB_E_RIGHTS_MODE_NOTE1"), EndNote()?>
</td>
</tr>
<?
$obIBlockRights = new CIBlockRights($ID);
IBlockShowRights(
'iblock',
$ID,
$ID,
GetMessage("IB_E_RIGHTS_SECTION_TITLE"),
"RIGHTS",
$obIBlockRights->GetRightsList(),
$obIBlockRights->GetRights(array("count_overwrited" => true)),
true
);
?>
<tr>
<td colspan="2"> </td>
</tr>
<?else:?>
<tr>
<td width="40%" class="adm-detail-valign-top"><label for="RIGHTS_MODE"><?echo GetMessage("IB_E_RIGHTS_MODE")?></label></td>
<td width="60%">
<input type="hidden" name="RIGHTS_MODE" value="S">
<input type="checkbox" id="RIGHTS_MODE" name="RIGHTS_MODE" value="E"><?echo BeginNote(), GetMessage("IB_E_RIGHTS_MODE_NOTE2"), EndNote()?>
</td>
</tr>
示例4: unset
if (preg_match("/^G(\\d)\$/", $arRight["GROUP_CODE"], $match) && is_array($arListsPerm) && in_array($match[1], $arListsPerm)) {
unset($arResult["RIGHTS"][$RIGHT_ID]);
$arResult["SELECTED"][$arRight["GROUP_CODE"]] = true;
} else {
//2) protect groups with iblock_% operations
$arOperations = CTask::GetOperations($arRight['TASK_ID'], true);
foreach ($arOperations as $operation) {
if (preg_match("/^iblock_(?!admin)/", $operation)) {
unset($arResult["RIGHTS"][$RIGHT_ID]);
$arResult["SELECTED"][$arRight["GROUP_CODE"]] = true;
break;
}
}
}
}
$arResult["TASKS"] = CIBlockRights::GetRightsList();
foreach ($arResult["TASKS"] as $TASK_ID => $label) {
//2) protect tasks with iblock_% operations
$arOperations = CTask::GetOperations($TASK_ID, true);
foreach ($arOperations as $operation) {
if (preg_match("/^iblock_(?!admin)/", $operation)) {
unset($arResult["TASKS"][$TASK_ID]);
break;
}
}
}
}
$arResult["VARS_FROM_FORM"] = $bVarsFromForm;
$arResult["FORM_DATA"] = array();
foreach ($data as $key => $value) {
$arResult["FORM_DATA"]["~" . $key] = $value;
示例5: while
if ($dbIB && ($arIB = $dbIB->Fetch())) {
$arResult['ENTITY_NAME'] = $arIB['NAME'];
$arResult['ENTITY_PARENTS'][] = $arIB['IBLOCK_SECTION_ID'];
}
}
if (sizeof($arResult['ENTITY_PARENTS']) > 0 && intval($arResult['ENTITY_PARENTS'][0]) > 0) {
$dbChain = CIBlockSection::GetNavChain($arParams['IBLOCK_ID'], $arResult['ENTITY_PARENTS'][0]);
if ($dbChain) {
while ($arChain = $dbChain->Fetch()) {
$arResult['ENTITY_PARENTS'][] = $arChain['IBLOCK_SECTION_ID'];
}
}
}
}
if ($USER->CanDoOperation('webdav_change_settings') || $obIBlockRights && $obIBlockRights->UserHasRightTo($arParams['IBLOCK_ID'], $arParams['ENTITY_ID'], $checkOP)) {
$arTasks = CIBlockRights::GetRightsList();
$arTaskLetters = CWebDavIblock::GetTasks();
//bad hack. It's not public rights.
if (isset($arTaskLetters['S'])) {
unset($arTasks[$arTaskLetters['S']]);
}
if (isset($arTaskLetters['T'])) {
unset($arTasks[$arTaskLetters['T']]);
}
$arResult['PERMISSIONS'] = $arTasks;
if (!$bCreate) {
$arRightParams = array("count_overwrited" => true);
if (!empty($arResult['ENTITY_PARENTS'])) {
$arRightParams['parents'] = $arResult['ENTITY_PARENTS'];
}
$arCurrent = $obIBlockRights->GetRights($arRightParams);