5use CIBlockElementRights;
7use CIBlockSectionRights;
11 private int $iblockId;
12 private array $elementsRights = [];
13 private array $sectionsRights = [];
17 $this->iblockId = $iblockId;
72 if (!empty($elementIds))
74 $rows = CIBlockElementRights::UserHasRightTo(
78 CIBlockElementRights::RETURN_OPERATIONS
82 $this->elementsRights[$elementId] =
$rights;
86 if (!empty($elementIds))
88 $rows = CIBlockSectionRights::UserHasRightTo(
92 CIBlockSectionRights::RETURN_OPERATIONS
96 $this->sectionsRights[$sectionId] =
$rights;
103 $cachedRights = $this->elementsRights[$elementId] ??
null;
104 if (isset($cachedRights))
106 return isset($cachedRights[
$right]);
109 return CIBlockElementRights::UserHasRightTo($this->
getIblockId(), $elementId,
$right);
114 $cachedRights = $this->sectionsRights[$sectionId] ??
null;
115 if ($cachedRights !==
null)
117 return isset($cachedRights[
$right]);
120 return CIBlockSectionRights::UserHasRightTo($this->
getIblockId(), $sectionId,
$right);
170 #endregion public api
canAddElement(int $elementId)
canBindSectionToSection(int $sectionId)
checkSectionRight(int $sectionId, string $right)
canDeleteSection(int $sectionId)
checkElementRight(int $elementId, string $right)
canEditSection(int $sectionId)
__construct(int $iblockId)
canBindElementToSection(int $sectionId)
preloadRights(array $elementIds, array $sectionIds)
canDeleteElement(int $elementId)
canEditElement(int $elementId)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)