- Модуль: fileman
- Путь к файлу: ~/bitrix/modules/fileman/classes/general/sticker.php
- Класс: CSticker
- Вызов: CSticker::GetOperations
static function GetOperations()
{
global $USER;
static $arOp;
$userGroups = $USER->GetUserGroupArray();
$key = implode('-', $userGroups);
if (!is_array($arOp))
$arOp = array();
if (!is_array($arOp[$key] ?? null))
{
$res = CSticker::GetAccessPermissions();
$arOp[$key] = array();
$bDefaultTask = false;
$count = 0;
foreach ($res as $group_id => $task_id)
if (in_array($group_id, $userGroups))
{
$arOp[$key] = array_merge($arOp[$key], CTask::GetOperations($task_id, true));
$count++;
}
if ($count < count($userGroups))
{
$defaultAccess = COption::GetOptionString('fileman', 'stickers_default_access', false);
if ($defaultAccess !== false)
$arOp[$key] = array_merge($arOp[$key], CTask::GetOperations($defaultAccess, true));
}
}
return $arOp[$key];
}