Flesh out more web UI actions for new URI interface
Summary: Ref T10748. - Allow users to add new URIs by clicking a button instead of knowing a secret URI. - Validate that URIs are actually valid URIs. - Add enable/disable action and strings. Test Plan: - Created a new URI. - Tried to create a nonsense URI, created a good URI. - Enabled/disabled a URI. Reviewers: chad Reviewed By: chad Maniphest Tasks: T10748 Differential Revision: https://secure.phabricator.com/D15825
This commit is contained in:
@@ -217,6 +217,25 @@ final class DiffusionURIEditor
|
||||
$errors[] = $error;
|
||||
break;
|
||||
}
|
||||
|
||||
foreach ($xactions as $xaction) {
|
||||
$new_uri = $xaction->getNewValue();
|
||||
if ($new_uri == $object->getURI()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
try {
|
||||
PhabricatorRepository::assertValidRemoteURI($new_uri);
|
||||
} catch (Exception $ex) {
|
||||
$errors[] = new PhabricatorApplicationTransactionValidationError(
|
||||
$type,
|
||||
pht('Invalid'),
|
||||
$ex->getMessage(),
|
||||
$xaction);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
case PhabricatorRepositoryURITransaction::TYPE_IO:
|
||||
$available = $object->getAvailableIOTypeOptions();
|
||||
|
||||
Reference in New Issue
Block a user