Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15469997
D12555.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D12555.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 5, 6:52 PM (1 w, 12 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7633283
Default Alt Text
D12555.diff (1 KB)
Attached To
Mode
D12555: Raise a better error for SSH access by users with no permission to use Diffusion
Attached
Detach File
Event Timeline
Log In to Comment