Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13959447
D16087.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
894 B
Referenced Files
None
Subscribers
None
D16087.diff
View Options
diff --git a/src/applications/pholio/query/PholioImageQuery.php b/src/applications/pholio/query/PholioImageQuery.php
--- a/src/applications/pholio/query/PholioImageQuery.php
+++ b/src/applications/pholio/query/PholioImageQuery.php
@@ -137,9 +137,12 @@
$all_files = mpull($all_files, null, 'getPHID');
if ($this->needInlineComments) {
- $all_inline_comments = id(new PholioTransactionComment())
- ->loadAllWhere('imageid IN (%Ld)',
- mpull($images, 'getID'));
+ // Only load inline comments the viewer has permission to see.
+ $all_inline_comments = id(new PholioTransactionComment())->loadAllWhere(
+ 'imageID IN (%Ld)
+ AND (transactionPHID IS NOT NULL OR authorPHID = %s)',
+ mpull($images, 'getID'),
+ $this->getViewer()->getPHID());
$all_inline_comments = mgroup($all_inline_comments, 'getImageID');
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Oct 15 2024, 7:28 PM (4 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6714071
Default Alt Text
D16087.diff (894 B)
Attached To
Mode
D16087: Don't include other users' unpublished drafts when counting Pholio inlines
Attached
Detach File
Event Timeline
Log In to Comment