Ejemplo n.º 1
0
 static function GetIBRights($type, $iblockID, $id = 0)
 {
     static $arRightModes = array();
     if (!isset($arRightModes[$iblockID])) {
         $arRightModes[$iblockID] = CIBlock::GetArrayByID($iblockID, "RIGHTS_MODE");
     }
     if ($type == 'SECTION' && $id == 0) {
         $type = 'IBLOCK';
     }
     $result = false;
     if ($arRightModes[$iblockID] === "E") {
         if ($type == 'IBLOCK') {
             $id = $iblockID;
         }
         $result = CWebDavIblock::GetPermissions($type, $id, $iblockID);
     } else {
         $result = CIBlock::GetPermission($iblockID);
     }
     if ($GLOBALS['USER']->CanDoOperation('webdav_change_settings')) {
         $result = 'X';
     }
     return $result;
 }