private function SaveGroupRight() { CMain::DelGroupRight($this->module_id); $GROUP = $_REQUEST['GROUPS']; $RIGHT = $_REQUEST['RIGHTS']; foreach ($GROUP as $k => $v) { if ($k == 0) { COption::SetOptionString($this->module_id, 'GROUP_DEFAULT_RIGHT', $RIGHT[0], 'Right for groups by default'); } else { CMain::SetGroupRight($this->module_id, $GROUP[$k], $RIGHT[$k]); } } }
WizardServices::SetFilePermission(array($siteID, "/bitrix/admin"), array($userGroupID => "R")); WizardServices::SetFilePermission(array($siteID, "/bitrix/admin"), array($userGroupID => "R")); $new_task_id = CTask::Add(array("NAME" => GetMessage("SALE_WIZARD_ADMIN_SALE"), "DESCRIPTION" => GetMessage("SALE_WIZARD_ADMIN_SALE_DESCR"), "LETTER" => "Q", "BINDING" => "module", "MODULE_ID" => "main")); if ($new_task_id) { $arOps = array(); $rsOp = COperation::GetList(array(), array("NAME" => "cache_control|view_own_profile|edit_own_profile")); while ($arOp = $rsOp->Fetch()) { $arOps[] = $arOp["ID"]; } CTask::SetOperations($new_task_id, $arOps); } $rsTasks = CTask::GetList(array(), array("MODULE_ID" => "main", "SYS" => "N", "BINDIG" => "module", "LETTER" => "Q")); if ($arTask = $rsTasks->Fetch()) { CGroup::SetModulePermission($userGroupID, $arTask["MODULE_ID"], $arTask["ID"]); } CMain::SetGroupRight("sale", $userGroupID, "U"); $rsTasks = CTask::GetList(array(), array("MODULE_ID" => "catalog", "SYS" => "Y", "BINDIG" => "module", "LETTER" => "T")); while ($arTask = $rsTasks->Fetch()) { CGroup::SetModulePermission($userGroupID, $arTask["MODULE_ID"], $arTask["ID"]); } } $userGroupID = ""; $dbGroup = CGroup::GetList($by = "", $order = "", array("STRING_ID" => "content_editor")); if ($arGroup = $dbGroup->Fetch()) { $userGroupID = $arGroup["ID"]; } else { $group = new CGroup(); $arFields = array("ACTIVE" => "Y", "C_SORT" => 300, "NAME" => GetMessage("SALE_WIZARD_CONTENT_EDITOR"), "DESCRIPTION" => GetMessage("SALE_WIZARD_CONTENT_EDITOR_DESCR"), "USER_ID" => array(), "STRING_ID" => "content_editor"); $userGroupID = $group->Add($arFields); $DB->Query("INSERT INTO b_sticker_group_task(GROUP_ID, TASK_ID)\tSELECT " . intVal($userGroupID) . ", ID FROM b_task WHERE NAME='stickers_edit' AND MODULE_ID='fileman'", false, "FILE: " . __FILE__ . "<br> LINE: " . __LINE__); }
} $userGroupID = ""; $dbGroup = CGroup::GetList($by = "", $order = "", array("STRING_ID" => "content_editor")); if ($arGroup = $dbGroup->Fetch()) { $userGroupID = $arGroup["ID"]; } else { $group = new CGroup(); $arFields = array("ACTIVE" => "Y", "C_SORT" => 300, "NAME" => GetMessage("TASK_WIZARD_CONTENT_EDITOR"), "DESCRIPTION" => GetMessage("TASK_WIZARD_CONTENT_EDITOR_DESCR"), "USER_ID" => array(), "STRING_ID" => "content_editor"); $userGroupID = $group->Add($arFields); $DB->Query("INSERT INTO b_sticker_group_task(GROUP_ID, TASK_ID)\tSELECT " . intVal($userGroupID) . ", ID FROM b_task WHERE NAME='stickers_edit' AND MODULE_ID='fileman'", false, "FILE: " . __FILE__ . "<br> LINE: " . __LINE__); } if (IntVal($userGroupID) > 0) { WizardServices::SetFilePermission(array($siteID, "/bitrix/admin"), array($userGroupID => "R")); CMain::SetGroupRight("blog", $userGroupID, "W"); CMain::SetGroupRight("forum", $userGroupID, "W"); CMain::SetGroupRight("socialnetwork", $userGroupID, "W"); $new_task_id = CTask::Add(array("NAME" => GetMessage("TASK_WIZARD_CONTENT_EDITOR"), "DESCRIPTION" => GetMessage("TASK_WIZARD_CONTENT_EDITOR_DESC"), "LETTER" => "Q", "BINDING" => "module", "MODULE_ID" => "main")); if ($new_task_id) { $arOps = array(); $rsOp = COperation::GetList(array(), array("NAME" => "cache_control|view_own_profile|edit_own_profile")); while ($arOp = $rsOp->Fetch()) { $arOps[] = $arOp["ID"]; } CTask::SetOperations($new_task_id, $arOps); } $rsTasks = CTask::GetList(array(), array("MODULE_ID" => "main", "SYS" => "N", "BINDIG" => "module", "LETTER" => "Q")); if ($arTask = $rsTasks->Fetch()) { CGroup::SetModulePermission($userGroupID, $arTask["MODULE_ID"], $arTask["ID"]); } $rsTasks = CTask::GetList(array(), array("MODULE_ID" => "fileman", "SYS" => "Y", "BINDIG" => "module", "LETTER" => "F")); if ($arTask = $rsTasks->Fetch()) {
CWizardUtil::ReplaceMacros(WIZARD_SITE_PATH . "/information/links/my/index.php", array("GROUPS_ID" => $arGroups['ID'])); } $userGroupID = ""; $dbGroup = CGroup::GetList($by = "", $order = "", array("STRING_ID" => "info_administrator")); if ($arGroup = $dbGroup->Fetch()) { $userGroupID = $arGroup["ID"]; } else { $group = new CGroup(); $arFields = array("ACTIVE" => "Y", "C_SORT" => 300, "NAME" => GetMessage("COMMUNITY_WIZARD_ADMINISTRATOR"), "DESCRIPTION" => GetMessage("COMMUNITY_WIZARD_ADMINISTRATOR_DESCR"), "USER_ID" => array(), "STRING_ID" => "info_administrator"); $userGroupID = $group->Add($arFields); $DB->Query("INSERT INTO b_sticker_group_task(GROUP_ID, TASK_ID)\tSELECT " . intVal($userGroupID) . ", ID FROM b_task WHERE NAME='stickers_edit' AND MODULE_ID='fileman'", false, "FILE: " . __FILE__ . "<br> LINE: " . __LINE__); } if (IntVal($userGroupID) > 0) { WizardServices::SetFilePermission(array($siteID, "/bitrix/admin"), array($userGroupID => "R")); CMain::SetGroupRight("blog", $userGroupID, "W"); CMain::SetGroupRight("forum", $userGroupID, "W"); $new_task_id = CTask::Add(array("NAME" => GetMessage("COMMUNITY_WIZARD_ADMINISTRATOR"), "DESCRIPTION" => GetMessage("COMMUNITY_WIZARD_ADMINISTRATOR_DESCR"), "LETTER" => "Q", "BINDING" => "module", "MODULE_ID" => "main")); if ($new_task_id) { $arOps = array(); $rsOp = COperation::GetList(array(), array("NAME" => "cache_control|view_own_profile|edit_own_profile")); while ($arOp = $rsOp->Fetch()) { $arOps[] = $arOp["ID"]; } CTask::SetOperations($new_task_id, $arOps); } $rsTasks = CTask::GetList(array(), array("MODULE_ID" => "main", "SYS" => "N", "BINDIG" => "module", "LETTER" => "Q")); if ($arTask = $rsTasks->Fetch()) { CGroup::SetModulePermission($userGroupID, $arTask["MODULE_ID"], $arTask["ID"]); } $rsTasks = CTask::GetList(array(), array("MODULE_ID" => "fileman", "SYS" => "Y", "BINDIG" => "module", "LETTER" => "F")); if ($arTask = $rsTasks->Fetch()) {