Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
eventviewtimerule.php
1<?php
2
4
9use Bitrix\Calendar\Access\Rule\Traits\CurrentUserTrait;
10
12{
13 use CurrentUserTrait;
14
15 public function execute(AccessibleItem $item = null, $params = null): bool
16 {
17 if (!$item instanceof EventModel)
18 {
19 return false;
20 }
21
22 if (!$this->hasCurrentUser())
23 {
24 return true;
25 }
26
27 if ($this->user->isAdmin() || $this->user->isSocNetAdmin($item->getSectionType()))
28 {
29 return true;
30 }
31
32 $section = SectionModel::createFromEventModel($item);
33
34 return $this->controller->check(
36 $section,
37 );
38 }
39}
execute(AccessibleItem $item=null, $params=null)