Changeset View
Changeset View
Standalone View
Standalone View
scripts/ssh/ssh-exec.php
| Show First 20 Lines • Show All 123 Lines • ▼ Show 20 Lines | if ($user_name && $device_name) { | ||||
| $device = id(new AlmanacDeviceQuery()) | $device = id(new AlmanacDeviceQuery()) | ||||
| ->setViewer(PhabricatorUser::getOmnipotentUser()) | ->setViewer(PhabricatorUser::getOmnipotentUser()) | ||||
| ->withNames(array($device_name)) | ->withNames(array($device_name)) | ||||
| ->executeOne(); | ->executeOne(); | ||||
| if (!$device) { | if (!$device) { | ||||
| throw new Exception( | throw new Exception( | ||||
| pht( | pht( | ||||
| 'Invalid device name ("%s"). There is no device with this name.', | 'Invalid device name ("%s"). There is no device with this name.', | ||||
| $device->getName())); | $device_name)); | ||||
| } | } | ||||
| // We're authenticated as a device, but we're going to read the user out of | // We're authenticated as a device, but we're going to read the user out of | ||||
| // the command below. | // the command below. | ||||
| $is_cluster_request = true; | $is_cluster_request = true; | ||||
| } else { | } else { | ||||
| throw new Exception( | throw new Exception( | ||||
| pht( | pht( | ||||
| ▲ Show 20 Lines • Show All 156 Lines • Show Last 20 Lines | |||||