Skip to content

Commit 72588d2

Browse files
author
epriestley
committedJun 22, 2016
Allow device-to-device SSH to establish SSH sessions
Summary: In D16167 I required users to be logged in to be "activated", but this logic doesn't account for that properly when the user is an Almanac device (a cluster host connecting to another cluster host). Don't do this check for device connections, they can always establish sessions. Test Plan: Will push. Reviewers: chad Reviewed By: chad Differential Revision: https://secure.phabricator.com/D16170
1 parent a75eea7 commit 72588d2

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed
 

‎scripts/ssh/ssh-exec.php

+8-6
Original file line numberDiff line numberDiff line change
@@ -190,12 +190,14 @@
190190
'P' => $user->getPHID(),
191191
));
192192

193-
if (!$user->canEstablishSSHSessions()) {
194-
throw new Exception(
195-
pht(
196-
'Your account ("%s") does not have permission to establish SSH '.
197-
'sessions. Visit the web interface for more information.',
198-
$user_name));
193+
if (!$device) {
194+
if (!$user->canEstablishSSHSessions()) {
195+
throw new Exception(
196+
pht(
197+
'Your account ("%s") does not have permission to establish SSH '.
198+
'sessions. Visit the web interface for more information.',
199+
$user_name));
200+
}
199201
}
200202

201203
$workflows = id(new PhutilClassMapQuery())

0 commit comments

Comments
 (0)
Failed to load comments.