- Модуль: iblock
- Путь к файлу: ~/bitrix/modules/iblock/classes/general/iblock_rights.php
- Класс: CIBlockSectionRights
- Вызов: CIBlockSectionRights::UserHasRightTo
static function UserHasRightTo($IBLOCK_ID, $ID, $permission, $flags = 0)
{
$acc = new CAccess;
$acc->UpdateCodes();
if($ID > 0)
{
$obRights = new CIBlockSectionRights($IBLOCK_ID, 0);
$ID2CHECK = $ID;
}
else
{
$obRights = new CIBlockRights($IBLOCK_ID);
$ID2CHECK = $IBLOCK_ID;
}
return CIBlockRights::_check_if_user_has_right($obRights, $ID2CHECK, $permission, $flags);
}