Page MenuHomePhabricator

D19666.id51154.diff
No OneTemporary

D19666.id51154.diff

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;
}

File Metadata

Mime Type
text/plain
Expires
Wed, Jan 22, 9:37 PM (13 h, 42 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7026512
Default Alt Text
D19666.id51154.diff (1 KB)

Event Timeline