diff --git a/src/applications/herald/adapter/HeraldAdapter.php b/src/applications/herald/adapter/HeraldAdapter.php --- a/src/applications/herald/adapter/HeraldAdapter.php +++ b/src/applications/herald/adapter/HeraldAdapter.php @@ -923,6 +923,11 @@ return $map; } + public static function isAdapterEnabled(PhabricatorUser $viewer, + HeraldAdapter $adapter) { + return $adapter->isAvailableToUser($viewer); + } + public function getEditorValueForCondition( PhabricatorUser $viewer, HeraldCondition $condition) { diff --git a/src/applications/herald/engine/HeraldEngine.php b/src/applications/herald/engine/HeraldEngine.php --- a/src/applications/herald/engine/HeraldEngine.php +++ b/src/applications/herald/engine/HeraldEngine.php @@ -520,8 +520,7 @@ // In particular, this means that the application must be installed and // accessible to the user. For example, if a user writes a Differential // rule and then loses access to Differential, this disables the rule. - $enabled = HeraldAdapter::getEnabledAdapterMap($rule->getAuthor()); - if (empty($enabled[$adapter->getAdapterContentType()])) { + if (!HeraldAdapter::isAdapterEnabled($rule->getAuthor(), $adapter)) { return false; }