1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
sectiontrait.php
См. документацию.
1<?php
2
3namespace Bitrix\Calendar\Access\Rule\Traits;
4
5use Bitrix\Calendar\Access\Model\SectionModel;
6use Bitrix\Calendar\Util;
7use Bitrix\Main\Loader;
8use Bitrix\Calendar\Core\Event;
9
10trait SectionTrait
11{
12 private function isOwner(SectionModel $section, int $userId): bool
13 {
14 return
15 $section->getType() === Event\Tools\Dictionary::CALENDAR_TYPE['user']
16 && $section->getOwnerId() === $userId
17 ;
18 }
19
20 private function isManager(SectionModel $section, int $userId): bool
21 {
22 $settings = \CCalendar::GetSettings(array('request' => false));
23
24 return
25 Loader::includeModule('intranet')
26 && $section->getType() === Event\Tools\Dictionary::CALENDAR_TYPE['user']
27 && ($settings['dep_manager_sub'] ?? false)
28 && Util::isManagerForUser($userId, $section->getOwnerId())
29 ;
30 }
31}
static isManagerForUser($managerId, $userId)
Определения util.php:39
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$settings
Определения product_settings.php:43