Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15282761
D21669.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D21669.diff
View Options
diff --git a/src/applications/diffusion/management/DiffusionRepositoryStorageManagementPanel.php b/src/applications/diffusion/management/DiffusionRepositoryStorageManagementPanel.php
--- a/src/applications/diffusion/management/DiffusionRepositoryStorageManagementPanel.php
+++ b/src/applications/diffusion/management/DiffusionRepositoryStorageManagementPanel.php
@@ -190,15 +190,19 @@
}
}
+ $last_writer = null;
+ $writer_epoch = null;
if ($write_properties) {
$writer_phid = idx($write_properties, 'userPHID');
- $last_writer = $viewer->renderHandle($writer_phid);
+
+ if ($writer_phid) {
+ $last_writer = $viewer->renderHandle($writer_phid);
+ }
$writer_epoch = idx($write_properties, 'epoch');
- $writer_epoch = phabricator_datetime($writer_epoch, $viewer);
- } else {
- $last_writer = null;
- $writer_epoch = null;
+ if ($writer_epoch) {
+ $writer_epoch = phabricator_datetime($writer_epoch, $viewer);
+ }
}
$rows[] = array(
diff --git a/src/applications/diffusion/protocol/DiffusionRepositoryClusterEngine.php b/src/applications/diffusion/protocol/DiffusionRepositoryClusterEngine.php
--- a/src/applications/diffusion/protocol/DiffusionRepositoryClusterEngine.php
+++ b/src/applications/diffusion/protocol/DiffusionRepositoryClusterEngine.php
@@ -11,6 +11,7 @@
private $repository;
private $viewer;
+ private $actingAsPHID;
private $logger;
private $clusterWriteLock;
@@ -44,6 +45,23 @@
return $this;
}
+ public function setActingAsPHID($acting_as_phid) {
+ $this->actingAsPHID = $acting_as_phid;
+ return $this;
+ }
+
+ public function getActingAsPHID() {
+ return $this->actingAsPHID;
+ }
+
+ private function getEffectiveActingAsPHID() {
+ if ($this->actingAsPHID) {
+ return $this->actingAsPHID;
+ }
+
+ return $this->getViewer()->getPHID();
+ }
+
/* -( Cluster Synchronization )-------------------------------------------- */
@@ -402,7 +420,7 @@
$repository_phid,
$device_phid,
array(
- 'userPHID' => $viewer->getPHID(),
+ 'userPHID' => $this->getEffectiveActingAsPHID(),
'epoch' => PhabricatorTime::getNow(),
'devicePHID' => $device_phid,
),
@@ -433,8 +451,6 @@
return;
}
- $viewer = $this->getViewer();
-
$device = AlmanacKeys::getLiveDevice();
$device_phid = $device->getPHID();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 5, 2:07 AM (2 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7223339
Default Alt Text
D21669.diff (2 KB)
Attached To
Mode
D21669: Improve display behavior for write locks held by omnipotent users
Attached
Detach File
Event Timeline
Log In to Comment