Метод assertCanExtendCascadeAncestors
Расположение
Исходный файл метода в Bitrix Framework
Путь к исходному файлу
строки
168–196
~/bitrix/modulesim/lib/V2/Integration/AiAssistant/Tools/AddUsersToChatTool.php
Исходный код
Сигнатура метода
private function assertCanExtendCascadeAncestors(ImToolContext $context, Chat $chat, int $userId): void
Возвращает:
void
Описание
Chat::addUsers() with the default AddUsersConfig cascades the add into parent chats (cascadeToParent) without re-checking the initiator's rights there, while manageUsersAdd settings of a child and its parent are independent. Walk the same ancestor chain the cascade will take (hasParent + requiresParentMembership, cycle-guarded like visitedChatIds) and require Action::Extend on each of those chats, so the tool cannot push users into a more protected ancestor.
Параметры
3| Имя | Тип | По умолчанию | Флаги |
|---|---|---|---|
$context
|
ImToolContext
|
-
|
-
|
$chat
|
Chat
|
-
|
-
|
$userId
|
int
|
-
|
-
|