55 $this->rightParam->getEntityId() &&
56 $this->listsPermission < \CListPermissions::CAN_READ &&
57 !\CIBlockElementRights::userHasRightTo(
58 $this->rightParam->getIblockId(), $this->rightParam->getEntityId(),
"element_read")
61 !$this->rightParam->getEntityId() &&
62 $this->listsPermission < \CListPermissions::CAN_READ &&
63 !\CIBlockSectionRights::userHasRightTo(
64 $this->rightParam->getIblockId(), $this->rightParam->getEntityId(),
"element_read")
68 $this->errorCollection->setError(
new Error(
"Access denied", self::ACCESS_DENIED));
81 $sectionId = $this->rightParam->getSectionId() ?? $this->rightParam->getEntityId();
84 !$this->socnetGroupClosed && ((
85 $this->rightParam->getEntityId() > 0 &&
87 $this->listsPermission >= \CListPermissions::CAN_WRITE ||
88 \CIBlockElementRights::UserHasRightTo(
89 $this->rightParam->getIblockId(), $this->rightParam->getEntityId(),
'element_edit')
93 $this->rightParam->getEntityId() == 0
95 $this->listsPermission >= \CListPermissions::CAN_WRITE ||
96 \CIBlockSectionRights::UserHasRightTo(
97 $this->rightParam->getIblockId(), $sectionId,
'section_element_bind')
108 $this->errorCollection->setError(
new Error(
"Access denied", self::ACCESS_DENIED));
120 $sectionId = $this->rightParam->getSectionId() ?? $this->rightParam->getEntityId();
123 !$this->socnetGroupClosed &&
125 $this->listsPermission > \CListPermissions::CAN_READ
126 || \CIBlockSectionRights::UserHasRightTo(
127 $this->rightParam->getIblockId(), $sectionId,
'section_element_bind'
138 $this->errorCollection->setError(
new Error(
'Access denied', self::ACCESS_DENIED));
152 !$this->socnetGroupClosed
153 && $this->rightParam->getEntityId()
155 $this->listsPermission >= \CListPermissions::CAN_WRITE
156 || \CIBlockElementRights::UserHasRightTo(
157 $this->rightParam->getIblockId(), $this->rightParam->getEntityId(),
'element_delete'
168 $this->errorCollection->setError(
new Error(
"Access denied", self::ACCESS_DENIED));
181 !$this->socnetGroupClosed
183 $this->listsPermission >= \CListPermissions::IS_ADMIN
184 || \CIBlockRights::UserHasRightTo(
185 $this->rightParam->getIblockId(), $this->rightParam->getIblockId(),
'iblock_edit'
196 $this->errorCollection->setError(
new Error(
"Access denied", self::ACCESS_DENIED));
207 !$this->socnetGroupClosed
210 $this->rightParam->getEntityId() > 0
211 && \CIBlockElementRights::UserHasRightTo(
212 $this->rightParam->getIblockId(),
213 $this->rightParam->getEntityId(),
214 'element_rights_edit'
218 $this->rightParam->getEntityId() === 0
219 && \CIBlockSectionRights::UserHasRightTo(
220 $this->rightParam->getIblockId(),
221 $this->rightParam->getSectionId() ?? 0,
222 'element_rights_edit'
233 $this->errorCollection->setError(
new Error(
'Access denied', self::ACCESS_DENIED));