Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15465115
D16087.id.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.id.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
Thu, Apr 3, 2:45 PM (3 w, 2 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7699624
Default Alt Text
D16087.id.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