Page MenuHomePhabricator

D13753.id.diff
No OneTemporary

D13753.id.diff

diff --git a/src/applications/meta/controller/PhabricatorApplicationUninstallController.php b/src/applications/meta/controller/PhabricatorApplicationUninstallController.php
--- a/src/applications/meta/controller/PhabricatorApplicationUninstallController.php
+++ b/src/applications/meta/controller/PhabricatorApplicationUninstallController.php
@@ -6,10 +6,6 @@
private $application;
private $action;
- public function shouldRequireAdmin() {
- return true;
- }
-
public function willProcessRequest(array $data) {
$this->application = $data['application'];
$this->action = $data['action'];
@@ -19,7 +15,15 @@
$request = $this->getRequest();
$user = $request->getUser();
- $selected = PhabricatorApplication::getByClass($this->application);
+ $selected = id(new PhabricatorApplicationQuery())
+ ->setViewer($user)
+ ->withClasses(array($this->application))
+ ->requireCapabilities(
+ array(
+ PhabricatorPolicyCapability::CAN_VIEW,
+ PhabricatorPolicyCapability::CAN_EDIT,
+ ))
+ ->executeOne();
if (!$selected) {
return new Aphront404Response();

File Metadata

Mime Type
text/plain
Expires
Oct 18 2024, 3:26 PM (4 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6719167
Default Alt Text
D13753.id.diff (1 KB)

Event Timeline