File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
wcfsetup/install/files/lib/system/endpoint/controller/core/attachments Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 77use Psr \Http \Message \ServerRequestInterface ;
88use wcf \data \attachment \Attachment ;
99use wcf \data \attachment \AttachmentAction ;
10+ use wcf \data \object \type \ObjectTypeCache ;
1011use wcf \http \Helper ;
1112use wcf \system \endpoint \DeleteRequest ;
1213use wcf \system \endpoint \IController ;
@@ -41,5 +42,9 @@ private function assertAttachmentBeDeleted(Attachment $attachment): void
4142 if (!WCF ::getSession ()->getPermission ("admin.attachment.canManageAttachment " ) || !$ attachment ->canDelete ()) {
4243 throw new PermissionDeniedException ();
4344 }
45+
46+ if (ObjectTypeCache::getInstance ()->getObjectType ($ attachment ->objectTypeID )->private ) {
47+ throw new PermissionDeniedException ();
48+ }
4449 }
4550}
You can’t perform that action at this time.
0 commit comments