1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
typeaccessrule.php
См. документацию.
1<?php
2
3namespace Bitrix\Calendar\Access\Rule;
4
5use Bitrix\Calendar\Access\Model\TypeModel;
6use Bitrix\Main\Access\AccessibleItem;
7use Bitrix\Calendar\Access\ActionDictionary;
8use Bitrix\Calendar\Access\Rule\Traits\CurrentUserTrait;
9use CCalendarType;
10
12{
13 use CurrentUserTrait;
14
15 public function execute(AccessibleItem $item = null, $params = null): bool
16 {
17 if (!$item instanceof TypeModel)
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->getXmlId()))
28 {
29 return true;
30 }
31
32 return in_array(
34 CCalendarType::GetOperations($item->getXmlId(), $this->user->getUserId()),
35 true
36 );
37 }
38}
static getOldActionKeyByNewActionKey(string $actionId)
Определения actiondictionary.php:57
execute(AccessibleItem $item=null, $params=null)
Определения typeaccessrule.php:15
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']
Определения template.php:799