Commit 412e18fe authored by Daniel Stone's avatar Daniel Stone Committed by Ana Rute Mendes
Browse files

WIP: Transactions: Hide transactions involving restricted objects

If a transaction has an object that a particular user cannot see, then
mark the transaction as hidden for the default transaction view. This
particularly elides 'foo moved this task from Restricted Workboard
Column to Restricted Workboard Column on the Restricted Project board'
messages in the timeline, which are not hugely useful.

This would need a fair bit more work to go upstream, especially eliding
notifications for restricted-only transactions as well.
parent b5e9b67f
......@@ -337,8 +337,22 @@ class PhabricatorApplicationTransactionView extends AphrontView {
foreach ($xactions as $key => $xaction) {
if ($xaction->shouldHide()) {
unset($xactions[$key]);
continue;
}
$phids = $xaction->getRequiredHandlePHIDs();
$handles = id(new PhabricatorHandleQuery())
->setViewer($this->getUser())
->withPHIDs($phids)
->execute();
foreach ($handles as $handle) {
if ($handle->getPolicyFiltered()) {
unset($xactions[$key]);
continue 2;
}
}
}
return $xactions;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment