Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15413610
D9714.id23325.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D9714.id23325.diff
View Options
diff --git a/src/applications/dashboard/paneltype/PhabricatorDashboardPanelTypeQuery.php b/src/applications/dashboard/paneltype/PhabricatorDashboardPanelTypeQuery.php
--- a/src/applications/dashboard/paneltype/PhabricatorDashboardPanelTypeQuery.php
+++ b/src/applications/dashboard/paneltype/PhabricatorDashboardPanelTypeQuery.php
@@ -80,6 +80,7 @@
}
$engine->setViewer($viewer);
+ $engine->setContext(PhabricatorApplicationSearchEngine::CONTEXT_PANEL);
$key = $panel->getProperty('key');
if ($engine->isBuiltinQuery($key)) {
diff --git a/src/applications/maniphest/query/ManiphestTaskSearchEngine.php b/src/applications/maniphest/query/ManiphestTaskSearchEngine.php
--- a/src/applications/maniphest/query/ManiphestTaskSearchEngine.php
+++ b/src/applications/maniphest/query/ManiphestTaskSearchEngine.php
@@ -532,15 +532,20 @@
$viewer = $this->requireViewer();
- $can_edit_priority = PhabricatorPolicyFilter::hasCapability(
- $viewer,
- $this->getApplication(),
- ManiphestCapabilityEditPriority::CAPABILITY);
-
- $can_bulk_edit = PhabricatorPolicyFilter::hasCapability(
- $viewer,
- $this->getApplication(),
- ManiphestCapabilityBulkEdit::CAPABILITY);
+ if ($this->isPanelContext()) {
+ $can_edit_priority = false;
+ $can_bulk_edit = false;
+ } else {
+ $can_edit_priority = PhabricatorPolicyFilter::hasCapability(
+ $viewer,
+ $this->getApplication(),
+ ManiphestCapabilityEditPriority::CAPABILITY);
+
+ $can_bulk_edit = PhabricatorPolicyFilter::hasCapability(
+ $viewer,
+ $this->getApplication(),
+ ManiphestCapabilityBulkEdit::CAPABILITY);
+ }
return id(new ManiphestTaskResultListView())
->setUser($viewer)
diff --git a/src/applications/search/engine/PhabricatorApplicationSearchEngine.php b/src/applications/search/engine/PhabricatorApplicationSearchEngine.php
--- a/src/applications/search/engine/PhabricatorApplicationSearchEngine.php
+++ b/src/applications/search/engine/PhabricatorApplicationSearchEngine.php
@@ -22,6 +22,10 @@
private $errors = array();
private $customFields = false;
private $request;
+ private $context;
+
+ const CONTEXT_LIST = 'list';
+ const CONTEXT_PANEL = 'panel';
public function setViewer(PhabricatorUser $viewer) {
$this->viewer = $viewer;
@@ -35,6 +39,15 @@
return $this->viewer;
}
+ public function setContext($context) {
+ $this->context = $context;
+ return $this;
+ }
+
+ public function isPanelContext() {
+ return ($this->context == self::CONTEXT_PANEL);
+ }
+
public function saveQuery(PhabricatorSavedQuery $query) {
$query->setEngineClassName(get_class($this));
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 20, 7:57 PM (1 w, 18 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7224654
Default Alt Text
D9714.id23325.diff (2 KB)
Attached To
Mode
D9714: Disable Maniphest task list grips in panel rendering contexts
Attached
Detach File
Event Timeline
Log In to Comment