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/ui/lib/Avatar/Mask/ |
Upload File : |
<?php namespace Bitrix\UI\Avatar\Mask; use \Bitrix\Main; use Bitrix\Main\Access\User\AccessibleUser; use \Bitrix\UI\Avatar; class Consumer extends Main\Access\User\UserModel implements AccessibleUser { public const ACCESS_USER = 'U'; public function getId() { return $this->getUserId(); } public function getRoles(): array { return $this->getAccessCodes(); } public function getPermission(string $permissionId, int $userFieldId = 0): ?int { return null; } public function getAccessCodes(): array { return array_merge(parent::getAccessCodes(), [ 'UA', Main\Access\AccessCode::ACCESS_EMPLOYEE . '0', static::ACCESS_USER . $this->getId()] ); } public function useRecentlyMaskId($id) { Avatar\Model\RecentlyUsedTable::addFromUser($id, $this->getId()); } }