Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
diskfolderaccesscheck.php
1<?php
2
4
9
17{
18 public function onBeforeAction(Event $event)
19 {
20 $chatId = $this->action->getController()->getRequest()->getHeader('Call-Chat-Id');
21 if (!$chatId)
22 {
23 $this->addError(new Error("Header Call-Chat-Id can't be empty"));
24
25 return new EventResult(EventResult::ERROR, null, null, $this);
26 }
27
28 if (!\Bitrix\Im\Chat::hasAccess($chatId))
29 {
30 $this->addError(new Error("You don't have access to this chat"));
31
32 return new EventResult(EventResult::ERROR, null, null, $this);
33 }
34
35 return null;
36 }
37}
hasAccess($user=null)
Definition Chat.php:499