- Модуль: socialnetwork
- Путь к файлу: ~/bitrix/modules/socialnetwork/lib/item/workgroup/accessmanager.php
- Класс: BitrixSocialnetworkItemWorkgroupAccessManager
- Вызов: AccessManager::canProcessIncomingRequest
public function canProcessIncomingRequest(): bool
{
$this->checkGroupEntityFields([
'ID',
'CLOSED',
'PROJECT',
'SCRUM_MASTER_ID',
'INITIATE_PERMS',
]);
$this->checkRelationEntityFields($this->currentUserRelation, [
'GROUP_ID',
'USER_ID',
'ROLE',
]);
$this->checkRelationEntityFields($this->targetUserRelation, [
'GROUP_ID',
'ROLE',
'INITIATED_BY_TYPE',
]);
if (
!$this->isCurrentUserModuleAdmin
&& !$this->checkRelationGroupId($this->currentUserRelation)
)
{
return false;
}
if (
!$this->targetUserRelation
|| !$this->checkRelationGroupId($this->targetUserRelation)
)
{
return false;
}
if ($this->targetUserRelation->get('ROLE') !== UserToGroupTable::ROLE_REQUEST)
{
return false;
}
if (
!$this->canCurrentProcessRequestsIn()
|| $this->targetUserRelation->get('INITIATED_BY_TYPE') !== UserToGroupTable::INITIATED_BY_USER
)
{
return false;
}
return true;
}