diff --git a/src/applications/diffusion/controller/DiffusionRepositoryCreateController.php b/src/applications/diffusion/controller/DiffusionRepositoryCreateController.php index 03820e5071..d077d031f0 100644 --- a/src/applications/diffusion/controller/DiffusionRepositoryCreateController.php +++ b/src/applications/diffusion/controller/DiffusionRepositoryCreateController.php @@ -152,10 +152,6 @@ final class DiffusionRepositoryCreateController // transactions to apply this change. $repository->setCallsign($callsign); - // Put the repository in "Importing" mode until we finish - // parsing it. - $repository->setDetail('importing', true); - $xactions[] = id(clone $template) ->setTransactionType($type_name) ->setNewValue( diff --git a/src/applications/repository/conduit/RepositoryCreateConduitAPIMethod.php b/src/applications/repository/conduit/RepositoryCreateConduitAPIMethod.php index 2d8a40c6d4..b8a898921f 100644 --- a/src/applications/repository/conduit/RepositoryCreateConduitAPIMethod.php +++ b/src/applications/repository/conduit/RepositoryCreateConduitAPIMethod.php @@ -16,7 +16,7 @@ final class RepositoryCreateConduitAPIMethod } public function getMethodDescription() { - return 'Create a new repository (Admin Only).'; + return pht('Create a new repository.'); } public function defineParamTypes() { @@ -48,8 +48,6 @@ final class RepositoryCreateConduitAPIMethod public function defineErrorTypes() { return array( - 'ERR-PERMISSIONS' => - 'You do not have the authority to call this method.', 'ERR-DUPLICATE' => 'Duplicate repository callsign.', 'ERR-BAD-CALLSIGN' => diff --git a/src/applications/repository/storage/PhabricatorRepository.php b/src/applications/repository/storage/PhabricatorRepository.php index fa40a4d96f..13ce78e54b 100644 --- a/src/applications/repository/storage/PhabricatorRepository.php +++ b/src/applications/repository/storage/PhabricatorRepository.php @@ -69,10 +69,16 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO $edit_policy = $app->getPolicy(DiffusionDefaultEditCapability::CAPABILITY); $push_policy = $app->getPolicy(DiffusionDefaultPushCapability::CAPABILITY); - return id(new PhabricatorRepository()) + $repository = id(new PhabricatorRepository()) ->setViewPolicy($view_policy) ->setEditPolicy($edit_policy) ->setPushPolicy($push_policy); + + // Put the repository in "Importing" mode until we finish + // parsing it. + $repository->setDetail('importing', true); + + return $repository; } protected function getConfiguration() {