Метод isDeletionRestricted

public static

Сигнатура метода

public static function isDeletionRestricted(int $activityId, array $activityFields, ?int $userId): bool

Возвращает: bool

Описание

Whether the given user is forbidden to delete the specified activity. Restricts deletion only for telephony (voximplant) call activities and only for users who are not admins of at least one of the activity's owner entities. System/anonymous contexts ($userId <= 0) are never restricted. The restriction is lifted via UserPermissions::isAdminForEntity(). For the standard CRM entities that telephony calls are bound to (deal/lead/contact/company) this is equivalent to isCrmAdmin(). The broader semantics - for a dynamic type inside an automated solution the restriction may also be lifted by that solution's admin - are intentional.

Параметры

3
Имя Тип По умолчанию Флаги
$activityId int —
—
$activityFields array —
—
$userId ?int —
—

Расположение

Исходный файл метода в Bitrix Framework

Путь к исходному файлу Source
~/bitrix/modulescrm/lib/activity/calldeletionrestriction.php
Расположение метода в файле
Строки 29–64

Исходный код

PHP