Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/calendar/lib/rooms/ |
Upload File : |
<?php namespace Bitrix\Calendar\Rooms; use Bitrix\Calendar\Integration\Bitrix24\FeatureDictionary; use Bitrix\Calendar\Integration\Bitrix24Manager; use Bitrix\Main\LoaderException; class PermissionManager { /** * @deprecated * @param $operation * * @return boolean */ public static function checkTypePermission($operation): bool { $userId = \CCalendar::GetUserId(); if(!\CCalendarType::CanDo($operation, Manager::TYPE, $userId)) { return false; } return true; } /** * @deprecated * @param $operation * @param $sectionId * * @return boolean */ public static function checkSectionPermission($operation, $sectionId): bool { $userId = \CCalendar::GetUserId(); if(!\CCalendarSect::CanDo($operation, $sectionId, $userId)) { return false; } return true; } /** * @return bool * @throws LoaderException */ public static function isLocationFeatureEnabled(): bool { return Bitrix24Manager::isFeatureEnabled(FeatureDictionary::CALENDAR_LOCATION); } /** * @return array */ public static function getAvailableOperations(): ?array { $result = \CCalendarType::GetList([ 'arFilter' => [ 'XML_ID' => 'location', ], ]); return $result[0]['PERM'] ?? null; } }