當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CIBlockRights::GetRightsList方法代碼示例

本文整理匯總了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"));
 }
開發者ID:spas-viktor,項目名稱:books,代碼行數:12,代碼來源:iblockdocument.php

示例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">&nbsp;</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 
開發者ID:Satariall,項目名稱:izurit,代碼行數:31,代碼來源:iblock_edit.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">&nbsp;</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>
開發者ID:ASDAFF,項目名稱:1C_Bitrix_info_site,代碼行數:31,代碼來源:iblock_edit.php

示例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;
開發者ID:webgksupport,項目名稱:alpina,代碼行數:31,代碼來源:component.php

示例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);
開發者ID:mrdeadmouse,項目名稱:u136006,代碼行數:31,代碼來源:component.php


注:本文中的CIBlockRights::GetRightsList方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。