diff --git a/src/applications/diffusion/controller/DiffusionRepositoryEditDeleteController.php b/src/applications/diffusion/controller/DiffusionRepositoryEditDeleteController.php --- a/src/applications/diffusion/controller/DiffusionRepositoryEditDeleteController.php +++ b/src/applications/diffusion/controller/DiffusionRepositoryEditDeleteController.php @@ -4,7 +4,10 @@ extends DiffusionRepositoryManageController { public function handleRequest(AphrontRequest $request) { - $response = $this->loadDiffusionContextForEdit(); + // This is just an information box, telling admins to use CLI for destroy. + // To increase shared knowledge about how Phorge works, we can safely show + // it to those who see the repository, not just those who can edit it. + $response = $this->loadDiffusionContext(); if ($response) { return $response; } diff --git a/src/applications/diffusion/management/DiffusionRepositoryBasicsManagementPanel.php b/src/applications/diffusion/management/DiffusionRepositoryBasicsManagementPanel.php --- a/src/applications/diffusion/management/DiffusionRepositoryBasicsManagementPanel.php +++ b/src/applications/diffusion/management/DiffusionRepositoryBasicsManagementPanel.php @@ -154,7 +154,8 @@ ->setName(pht('Delete Repository')) ->setHref($delete_uri) ->setIcon('fa-times') - ->setWorkflow(true)); + ->setWorkflow(true) + ->setDisabled(!$can_edit)); return $this->newCurtainView() ->setActionList($action_list);