Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
usermodel.php
1
<?php
2
3
namespace
Bitrix\Calendar\Access\Model
;
4
5
use
Bitrix\Calendar\Core\Event\Tools\Dictionary
;
6
use
Bitrix\Main\Engine\CurrentUser
;
7
use
Bitrix\Main\Loader
;
8
9
class
UserModel
extends
\Bitrix\Main\Access\User\UserModel
10
{
11
12
public
function
getRoles
(): array
13
{
14
//stub
15
return
[];
16
}
17
18
public
function
getPermission
(
string
$permissionId): ?int
19
{
20
//stub
21
return
0;
22
}
23
24
public
function
isSocNetAdmin
(
string
$xmlId): bool
25
{
26
return
(
27
$xmlId ===
Dictionary::CALENDAR_TYPE
[
'group'
]
28
|| $xmlId ===
Dictionary::CALENDAR_TYPE
[
'user'
]
29
|| \CCalendar::IsBitrix24()
30
)
31
&& \CCalendar::IsSocNet()
32
&& \CCalendar::IsSocnetAdmin()
33
;
34
}
35
36
public
function
isExtranetUser
(): bool
37
{
38
return
39
Loader::includeModule(
'intranet'
)
40
&& !\Bitrix\Intranet\Util::isIntranetUser($this->userId)
41
;
42
}
43
}
Bitrix\Calendar\Access\Model\UserModel
Definition
usermodel.php:10
Bitrix\Calendar\Access\Model\UserModel\getRoles
getRoles()
Definition
usermodel.php:12
Bitrix\Calendar\Access\Model\UserModel\getPermission
getPermission(string $permissionId)
Definition
usermodel.php:18
Bitrix\Calendar\Access\Model\UserModel\isSocNetAdmin
isSocNetAdmin(string $xmlId)
Definition
usermodel.php:24
Bitrix\Calendar\Access\Model\UserModel\isExtranetUser
isExtranetUser()
Definition
usermodel.php:36
Bitrix\Calendar\Core\Event\Tools\Dictionary
Definition
dictionary.php:8
Bitrix\Calendar\Core\Event\Tools\Dictionary\CALENDAR_TYPE
const CALENDAR_TYPE
Definition
dictionary.php:44
Bitrix\Main\Access\User\UserModel
Definition
usermodel.php:18
Bitrix\Main\Engine\CurrentUser
Definition
currentuser.php:8
Bitrix\Main\Loader
Definition
loader.php:12
Bitrix\Calendar\Access\Model
Definition
eventmodel.php:3
modules
calendar
lib
access
model
usermodel.php
Создано системой
1.10.0