From f970b350ea2fb2a6542b59f585da86318b2e20c4 Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 25 Feb 2021 12:10:40 -0800 Subject: [PATCH] Correct behavior of "writable" Almanac service binding for repository services Summary: Ref T13611. This property worked correctly when implemented in D19357. The behavior was broken by D20775, which tested node-level routing but did not specifically re-test the "writable" property. This was difficult to spot because ref query outcomes weren't observable in the UI, and the ref itself had the correct property value. Test Plan: See D21575. After this change, the UI shows the correct state, rather than showing a read-only service ref as writable: {F8465865} Maniphest Tasks: T13611 Differential Revision: https://secure.phabricator.com/D21576 --- src/applications/repository/storage/PhabricatorRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/repository/storage/PhabricatorRepository.php b/src/applications/repository/storage/PhabricatorRepository.php index ca6fd7c484..5e169fda6a 100644 --- a/src/applications/repository/storage/PhabricatorRepository.php +++ b/src/applications/repository/storage/PhabricatorRepository.php @@ -1975,7 +1975,7 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO if ($writable) { foreach ($refs as $key => $ref) { if (!$ref->isWritable()) { - unset($results[$key]); + unset($refs[$key]); } }