• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/restriction/restrictionmanager.php
  • Класс: Bitrix\Crm\Restriction\RestrictionManager
  • Вызов: RestrictionManager::getCalendarSharingRestriction
static function getCalendarSharingRestriction(): Bitrix24AccessRestriction
{
	if (is_null(static::$calendarSharingRestriction))
	{
		static::$calendarSharingRestriction = new Bitrix24AccessRestriction(
			'crm_event_sharing',
			false,
			null,
			[
				'ID' => 'limit_crm_calendar_free_slots'
			],
		);

		if (!static::$calendarSharingRestriction->load())
		{
			static::$calendarSharingRestriction->permit(
				Bitrix24Manager::isFeatureEnabled('crm_event_sharing')
			);
		}
	}

	return static::$calendarSharingRestriction;
}