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