Page MenuHomePhabricator

D19232.id46051.diff
No OneTemporary

D19232.id46051.diff

diff --git a/src/applications/harbormaster/event/HarbormasterUIEventListener.php b/src/applications/harbormaster/event/HarbormasterUIEventListener.php
--- a/src/applications/harbormaster/event/HarbormasterUIEventListener.php
+++ b/src/applications/harbormaster/event/HarbormasterUIEventListener.php
@@ -51,13 +51,22 @@
return;
}
- $buildable = id(new HarbormasterBuildableQuery())
- ->setViewer($viewer)
- ->withManualBuildables(false)
- ->withBuildablePHIDs(array($buildable_phid))
- ->needBuilds(true)
- ->needTargets(true)
- ->executeOne();
+ try {
+ $buildable = id(new HarbormasterBuildableQuery())
+ ->setViewer($viewer)
+ ->withManualBuildables(false)
+ ->withBuildablePHIDs(array($buildable_phid))
+ ->needBuilds(true)
+ ->needTargets(true)
+ ->executeOne();
+ } catch (PhabricatorPolicyException $ex) {
+ // TODO: See PHI430. When this query raises a policy exception, it
+ // fatals the whole page because it happens very late in execution,
+ // during final page rendering. If the viewer can't see the buildable or
+ // some of the builds, just hide this element for now.
+ return;
+ }
+
if (!$buildable) {
return;
}

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 23, 5:02 AM (13 h, 45 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6776992
Default Alt Text
D19232.id46051.diff (1 KB)

Event Timeline