Метод canManageLaunchedTemplate
Сигнатура метода
public function canManageLaunchedTemplate(int $templateId, int $userId, bool $isUserAdmin, bool $requireStarted = false): bool
Возвращает:
bool
Описание
Server-side ownership guard for managing a launched AI-agent (restart/fill). Returns true only when $templateId is a launched AI-agent copy (TYPE=Nodes, SYSTEM_CODE IS NULL) and the user is its owner (ACTIVATED_BY) or an admin. Single source of truth used by the controllers (start/fill) to forbid managing an agent owned by another user.
Параметры
4| Имя | Тип | По умолчанию | Флаги |
|---|---|---|---|
$templateId
|
int
|
—
|
—
|
$userId
|
int
|
—
|
—
|
$isUserAdmin
|
bool
|
—
|
—
|
$requireStarted
|
bool
|
false
|
—
|
Расположение
Исходный файл метода в Bitrix Framework
Путь к исходному файлу
Source
~/bitrix/modulesbizproc/lib/Public/Provider/WorkflowTemplate/AiAgentProvider.php
Расположение метода в файле
Строки
90–103