else { function GetAccessArrTmp($path) { global $DOC_ROOT; $io = CBXVirtualIo::GetInstance(); if($io->DirectoryExists($DOC_ROOT.$path)) { @include($io->GetPhysicalName($DOC_ROOT.$path."/.access.php")); return $PERM; } return Array(); } // let's get array of access rights for whole folder $CUR_PERM = GetAccessArrTmp($arParsedPath["PREV"]); if($REQUEST_METHOD=="POST" && strlen($save)>0 && strlen($propeditmore)<=0 && check_freetrix_sessid()) { $bNeedSectionFile = False; $strSectionName = ""; if(strlen($sectionname)>0) { $strSectionName = "\$sSectionName = \"".CFileMan::EscapePHPString($sectionname)."\";\n"; $bNeedSectionFile = True; } $strDirProperties = "\$arDirProperties = array(\n"; $numpropsvals = IntVal($numpropsvals); $bNeedComma = False;
if ($createNewSaleUser) { $APPLICATION->SetGroupRight("sale", $groupId, "W", false); //$APPLICATION->SetGroupRight("catalog", $groupId, "R", false); CGroup::SetModulePermission($groupId, "catalog", CTask::GetIdByLetter("R", "catalog")); //$APPLICATION->SetGroupRight("main", $groupId, "R", false); CGroup::SetModulePermission($groupId, "main", CTask::GetIdByLetter("R", "main")); $opt = COption::GetOptionString("sale", "1C_SALE_GROUP_PERMISSIONS", ""); $opt .= ($opt != "" ? "," : "") . $groupId; COption::SetOptionString("sale", "1C_SALE_GROUP_PERMISSIONS", $opt); function GetAccessArrTmp() { $PERM = array(); @(include $_SERVER["DOCUMENT_ROOT"] . "/bitrix/.access.php"); return $PERM; } $arFPermsTmp = GetAccessArrTmp(); $arFPerms = array_key_exists("admin", $arFPermsTmp) ? $arFPermsTmp["admin"] : array(); $arFPerms[$groupId . ""] = "R"; $APPLICATION->SetFileAccessPermission(array(SITE_ID, "/bitrix/admin"), $arFPerms); } LocalRedirect($APPLICATION->GetCurPage() . "?lang=" . LANGUAGE_ID . "&success=Y&crm_imp_url=" . urlencode(($crmUrlScheme == 'ssl://' ? "https" : "http") . "://" . $crmUrlHost . ":" . $crmUrlPort . $crmUrl4Import) . "&crm_url=" . urlencode(($crmUrlScheme == 'ssl://' ? "https" : "http") . "://" . $crmUrlHost . ":" . $crmUrlPort)); } else { if ($createNewSaleUser) { if ($groupId > 0) { $group = new CGroup(); $group->Delete($groupId); } if ($userId > 0) { CUser::Delete($userId); } }
?> </td> <td valign="top" align="center" nowrap> <?php echo GetMessage("FILEMAN_ACCESS_LEVEL"); ?> </td> <td valign="top" align="center" nowrap> <?php echo GetMessage("FILEMAN_ACCESS_LEVEL_CUR"); ?> </td> </tr> <? //возьмем массив прав доступа для всей папки $CUR_PERM = GetAccessArrTmp($path); //for each groups $db_groups = CGroup::GetList($order="sort", $by="asc", array("ACTIVE" => "Y", "ADMIN" => "N")); while($db_groups->ExtractFields("g_")): if($g_ANONYMOUS=="Y") $anonym = $g_NAME; if(isset($arSubordGroups) && !in_array($g_ID,$arSubordGroups)) continue; //**** Inherit access level ******* if (!$bDiff) { $pAr = $APPLICATION->GetFileAccessPermission(Array($site, $path."/".$arFiles[0]), Array($g_ID), true); if (count($pAr) > 0)