Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
mailsecuritycontext.php
1
<?php
2
3
namespace
Bitrix\Mail\Disk\Security
;
4
5
use
Bitrix\Main
;
6
use
Bitrix\Mail
;
7
use Bitrix\Disk;
8
9
if
(!Main\Loader::includeModule(
'disk'
))
10
{
11
return
false
;
12
}
13
14
class
MailSecurityContext
extends
Disk\Security\SecurityContext
15
{
16
21
public
function
canAdd
($targetId)
22
{
23
return
true
;
24
}
25
30
public
function
canChangeRights
($objectId)
31
{
32
return
false
;
33
}
34
39
public
function
canChangeSettings
($objectId)
40
{
41
return
false
;
42
}
43
48
public
function
canCreateWorkflow
($objectId)
49
{
50
return
false
;
51
}
52
57
public
function
canDelete
($objectId)
58
{
59
return
false
;
60
}
61
66
public
function
canMarkDeleted
($objectId)
67
{
68
return
false
;
69
}
70
76
public
function
canMove
($objectId, $targetId)
77
{
78
return
false
;
79
}
80
85
public
function
canRead
($objectId)
86
{
87
global $DB;
88
89
$message = $DB->query(sprintf(
90
'SELECT ID, MAILBOX_ID FROM b_mail_message WHERE ID IN (
91
SELECT MESSAGE_ID FROM b_mail_msg_attachment WHERE FILE_ID = (
92
SELECT FILE_ID FROM b_disk_object WHERE ID = %u
93
)
94
)'
,
95
$objectId
96
))->fetch();
97
98
return
Mail\Helper\Message::hasAccess($message, $this->userId);
99
}
100
105
public
function
canRename
($objectId)
106
{
107
return
false
;
108
}
109
114
public
function
canRestore
($objectId)
115
{
116
return
false
;
117
}
118
123
public
function
canShare
($objectId)
124
{
125
return
false
;
126
}
127
132
public
function
canUpdate
($objectId)
133
{
134
return
false
;
135
}
136
141
public
function
canStartBizProc
($objectId)
142
{
143
return
false
;
144
}
145
146
public
function
getSqlExpressionForList
($columnObjectId, $columnCreatedBy)
147
{
148
return
'1 = 0'
;
149
}
150
151
}
Bitrix\Mail\Disk\Security\MailSecurityContext
Definition
mailsecuritycontext.php:15
Bitrix\Mail\Disk\Security\MailSecurityContext\canDelete
canDelete($objectId)
Definition
mailsecuritycontext.php:57
Bitrix\Mail\Disk\Security\MailSecurityContext\canChangeRights
canChangeRights($objectId)
Definition
mailsecuritycontext.php:30
Bitrix\Mail\Disk\Security\MailSecurityContext\canRestore
canRestore($objectId)
Definition
mailsecuritycontext.php:114
Bitrix\Mail\Disk\Security\MailSecurityContext\canUpdate
canUpdate($objectId)
Definition
mailsecuritycontext.php:132
Bitrix\Mail\Disk\Security\MailSecurityContext\canRename
canRename($objectId)
Definition
mailsecuritycontext.php:105
Bitrix\Mail\Disk\Security\MailSecurityContext\canMove
canMove($objectId, $targetId)
Definition
mailsecuritycontext.php:76
Bitrix\Mail\Disk\Security\MailSecurityContext\canAdd
canAdd($targetId)
Definition
mailsecuritycontext.php:21
Bitrix\Mail\Disk\Security\MailSecurityContext\canChangeSettings
canChangeSettings($objectId)
Definition
mailsecuritycontext.php:39
Bitrix\Mail\Disk\Security\MailSecurityContext\getSqlExpressionForList
getSqlExpressionForList($columnObjectId, $columnCreatedBy)
Definition
mailsecuritycontext.php:146
Bitrix\Mail\Disk\Security\MailSecurityContext\canCreateWorkflow
canCreateWorkflow($objectId)
Definition
mailsecuritycontext.php:48
Bitrix\Mail\Disk\Security\MailSecurityContext\canRead
canRead($objectId)
Definition
mailsecuritycontext.php:85
Bitrix\Mail\Disk\Security\MailSecurityContext\canShare
canShare($objectId)
Definition
mailsecuritycontext.php:123
Bitrix\Mail\Disk\Security\MailSecurityContext\canMarkDeleted
canMarkDeleted($objectId)
Definition
mailsecuritycontext.php:66
Bitrix\Mail\Disk\Security\MailSecurityContext\canStartBizProc
canStartBizProc($objectId)
Definition
mailsecuritycontext.php:141
Bitrix\Mail\Disk\Security
Definition
mailsecuritycontext.php:3
Bitrix\Mail
Definition
blacklist.php:3
Bitrix\Main
modules
mail
lib
disk
security
mailsecuritycontext.php
Создано системой
1.10.0