From 5b49fd93e23016d4ed7540c4fee2c40c19542ef7 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 22 Oct 2013 00:21:53 +0200 Subject: [PATCH] Don't show edit button for tasks if editing is not allowed --- .../maniphest/controller/ManiphestTaskListController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/applications/maniphest/controller/ManiphestTaskListController.php b/src/applications/maniphest/controller/ManiphestTaskListController.php index dc3e71f80f..8a30de5b96 100644 --- a/src/applications/maniphest/controller/ManiphestTaskListController.php +++ b/src/applications/maniphest/controller/ManiphestTaskListController.php @@ -62,10 +62,13 @@ final class ManiphestTaskListController $result = array(); + $can_edit = $this->hasApplicationCapability( + PhabricatorPolicyCapability::CAN_EDIT); + $lists = array(); foreach ($groups as $group => $list) { $task_list = new ManiphestTaskListView(); - $task_list->setShowBatchControls(true); + $task_list->setShowBatchControls($can_edit); if ($can_drag) { $task_list->setShowSubpriorityControls(true); }