From 1996b0cd55c5f43a4fdbb0679deebd80ebc0adc7 Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 18 Nov 2019 21:40:10 -0800 Subject: [PATCH] Update the "owner can always view/edit" policy exception rule Summary: Fixes T13460. This rule vanished from the UI in D20165; update things so it returns to the UI. Test Plan: {F7035134} Maniphest Tasks: T13460 Differential Revision: https://secure.phabricator.com/D20917 --- .../maniphest/policy/ManiphestTaskPolicyCodex.php | 9 +++++++++ src/applications/maniphest/storage/ManiphestTask.php | 4 ---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/applications/maniphest/policy/ManiphestTaskPolicyCodex.php b/src/applications/maniphest/policy/ManiphestTaskPolicyCodex.php index 638d9bfa60..4394331541 100644 --- a/src/applications/maniphest/policy/ManiphestTaskPolicyCodex.php +++ b/src/applications/maniphest/policy/ManiphestTaskPolicyCodex.php @@ -39,6 +39,15 @@ final class ManiphestTaskPolicyCodex $rules = array(); + $rules[] = $this->newRule() + ->setCapabilities( + array( + PhabricatorPolicyCapability::CAN_VIEW, + PhabricatorPolicyCapability::CAN_EDIT, + )) + ->setDescription( + pht('The owner of a task can always view and edit it.')); + $rules[] = $this->newRule() ->setCapabilities( array( diff --git a/src/applications/maniphest/storage/ManiphestTask.php b/src/applications/maniphest/storage/ManiphestTask.php index c56d8fe57a..4f90de3507 100644 --- a/src/applications/maniphest/storage/ManiphestTask.php +++ b/src/applications/maniphest/storage/ManiphestTask.php @@ -358,10 +358,6 @@ final class ManiphestTask extends ManiphestDAO return false; } - public function describeAutomaticCapability($capability) { - return pht('The owner of a task can always view and edit it.'); - } - /* -( PhabricatorTokenReceiverInterface )---------------------------------- */