Page MenuHomePhabricator

D12555.diff
No OneTemporary

D12555.diff

diff --git a/src/applications/diffusion/ssh/DiffusionSSHWorkflow.php b/src/applications/diffusion/ssh/DiffusionSSHWorkflow.php
--- a/src/applications/diffusion/ssh/DiffusionSSHWorkflow.php
+++ b/src/applications/diffusion/ssh/DiffusionSSHWorkflow.php
@@ -112,12 +112,23 @@
final public function execute(PhutilArgumentParser $args) {
$this->args = $args;
+ $viewer = $this->getUser();
+ $have_diffusion = PhabricatorApplication::isClassInstalledForViewer(
+ 'PhabricatorDiffusionApplication',
+ $viewer);
+ if (!$have_diffusion) {
+ throw new Exception(
+ pht(
+ 'You do not have permission to access the Diffusion application, '.
+ 'so you can not interact with repositories over SSH.'));
+ }
+
$repository = $this->identifyRepository();
$this->setRepository($repository);
$is_cluster_request = $this->getIsClusterRequest();
$uri = $repository->getAlmanacServiceURI(
- $this->getUser(),
+ $viewer,
$is_cluster_request,
array(
'ssh',

File Metadata

Mime Type
text/plain
Expires
Sat, Apr 12, 11:46 PM (3 h, 12 m ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7633283
Default Alt Text
D12555.diff (1 KB)

Event Timeline