Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14110739
D21555.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
5 KB
Referenced Files
None
Subscribers
None
D21555.diff
View Options
diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -9,7 +9,7 @@
'names' => array(
'conpherence.pkg.css' => '0e3cf785',
'conpherence.pkg.js' => '020aebcf',
- 'core.pkg.css' => '7cb6808c',
+ 'core.pkg.css' => '0ae696de',
'core.pkg.js' => '079198f6',
'dark-console.pkg.js' => '187792c2',
'differential.pkg.css' => '5c459f92',
@@ -180,7 +180,7 @@
'rsrc/css/phui/phui-remarkup-preview.css' => '91767007',
'rsrc/css/phui/phui-segment-bar-view.css' => '5166b370',
'rsrc/css/phui/phui-spacing.css' => 'b05cadc3',
- 'rsrc/css/phui/phui-status.css' => 'e5ff8be0',
+ 'rsrc/css/phui/phui-status.css' => '293b5dad',
'rsrc/css/phui/phui-tag-view.css' => 'fb811341',
'rsrc/css/phui/phui-timeline-view.css' => '2d32d7a9',
'rsrc/css/phui/phui-two-column-view.css' => 'f96d319f',
@@ -885,7 +885,7 @@
'phui-remarkup-preview-css' => '91767007',
'phui-segment-bar-view-css' => '5166b370',
'phui-spacing-css' => 'b05cadc3',
- 'phui-status-list-view-css' => 'e5ff8be0',
+ 'phui-status-list-view-css' => '293b5dad',
'phui-tag-view-css' => 'fb811341',
'phui-theme-css' => '35883b37',
'phui-timeline-view-css' => '2d32d7a9',
diff --git a/src/applications/differential/view/DifferentialReviewersView.php b/src/applications/differential/view/DifferentialReviewersView.php
--- a/src/applications/differential/view/DifferentialReviewersView.php
+++ b/src/applications/differential/view/DifferentialReviewersView.php
@@ -26,6 +26,8 @@
public function render() {
$viewer = $this->getUser();
$reviewers = $this->reviewers;
+ $diff = $this->diff;
+ $handles = $this->handles;
$view = new PHUIStatusListView();
@@ -40,10 +42,15 @@
}
}
+ PhabricatorPolicyFilterSet::loadHandleViewCapabilities(
+ $viewer,
+ $handles,
+ array($diff));
+
$reviewers = $head + $tail;
foreach ($reviewers as $reviewer) {
$phid = $reviewer->getReviewerPHID();
- $handle = $this->handles[$phid];
+ $handle = $handles[$phid];
$action_phid = $reviewer->getLastActionDiffPHID();
$is_current_action = $this->isCurrent($action_phid);
@@ -154,7 +161,10 @@
}
$item->setIcon($icon, $color, $label);
- $item->setTarget($handle->renderHovercardLink());
+ $item->setTarget(
+ $handle->renderHovercardLink(
+ null,
+ $diff->getPHID()));
if ($reviewer->isPackage()) {
if (!$reviewer->getChangesets()) {
@@ -162,6 +172,15 @@
}
}
+ if ($handle->hasCapabilities()) {
+ if (!$handle->hasViewCapability($diff)) {
+ $item
+ ->setIcon('fa-eye-slash', 'red')
+ ->setNote(pht('No View Permission'))
+ ->setIsExiled(true);
+ }
+ }
+
$view->addItem($item);
}
diff --git a/src/applications/phid/PhabricatorObjectHandle.php b/src/applications/phid/PhabricatorObjectHandle.php
--- a/src/applications/phid/PhabricatorObjectHandle.php
+++ b/src/applications/phid/PhabricatorObjectHandle.php
@@ -300,15 +300,21 @@
return $this->renderLinkWithAttributes($name, array());
}
- public function renderHovercardLink($name = null) {
+ public function renderHovercardLink($name = null, $context_phid = null) {
Javelin::initBehavior('phui-hovercards');
+ $hovercard_spec = array(
+ 'objectPHID' => $this->getPHID(),
+ );
+
+ if ($context_phid) {
+ $hovercard_spec['contextPHID'] = $context_phid;
+ }
+
$attributes = array(
'sigil' => 'hovercard',
'meta' => array(
- 'hovercardSpec' => array(
- 'objectPHID' => $this->getPHID(),
- ),
+ 'hovercardSpec' => $hovercard_spec,
),
);
diff --git a/src/view/phui/PHUIStatusItemView.php b/src/view/phui/PHUIStatusItemView.php
--- a/src/view/phui/PHUIStatusItemView.php
+++ b/src/view/phui/PHUIStatusItemView.php
@@ -8,6 +8,7 @@
private $target;
private $note;
private $highlighted;
+ private $isExiled;
const ICON_ACCEPT = 'fa-check-circle';
const ICON_REJECT = 'fa-times-circle';
@@ -46,6 +47,11 @@
return $this;
}
+ public function setIsExiled($is_exiled) {
+ $this->isExiled = $is_exiled;
+ return $this;
+ }
+
protected function canAppendChild() {
return false;
}
@@ -60,6 +66,10 @@
$classes[] = 'phui-status-item-highlighted';
}
+ if ($this->isExiled) {
+ $classes[] = 'phui-status-item-exiled';
+ }
+
return array(
'class' => $classes,
);
diff --git a/webroot/rsrc/css/phui/phui-status.css b/webroot/rsrc/css/phui/phui-status.css
--- a/webroot/rsrc/css/phui/phui-status.css
+++ b/webroot/rsrc/css/phui/phui-status.css
@@ -29,10 +29,16 @@
border-radius: 3px;
}
+.phui-status-item-exiled td {
+ background-color: {$lightredbackground};
+ border-radius: 3px;
+}
+
.phui-status-list-view td a {
color: {$darkbluetext};
}
-.phui-status-item-highlighted td.phui-status-item-note {
+.phui-status-item-highlighted td.phui-status-item-note,
+.phui-status-item-exiled td.phui-status-item-note {
background-color: transparent;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 28, 6:56 PM (20 h, 18 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6798427
Default Alt Text
D21555.diff (5 KB)
Attached To
Mode
D21555: When a reviewer can't see a revision, show it clearly in the reviewer list
Attached
Detach File
Event Timeline
Log In to Comment