From 0566c2647f3da626a8c153fadd1554cc841f5c2b Mon Sep 17 00:00:00 2001 From: Keith W Date: Tue, 23 Oct 2018 07:17:30 -0500 Subject: [PATCH 1/2] Deactivate rule if disabled The change deactivates the rule if a user has disabled it. --- .../HandleRules/RuleService.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleService.cs b/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleService.cs index 211c5d380..2873a1ebc 100644 --- a/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleService.cs +++ b/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleService.cs @@ -56,6 +56,11 @@ namespace Squidex.Domain.Apps.Core.HandleRules Guard.NotNull(rule, nameof(rule)); Guard.NotNull(@event, nameof(@event)); + if (!rule.IsEnabled) + { + return null; + } + if (!(@event.Payload is AppEvent appEvent)) { return null; From dc174f384cb5aea6eaccc2a8fdc0eb36f0769fe3 Mon Sep 17 00:00:00 2001 From: Keith Wyss Date: Tue, 23 Oct 2018 08:52:17 -0500 Subject: [PATCH 2/2] Fixed whitespace issues. --- .../HandleRules/RuleService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleService.cs b/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleService.cs index 2873a1ebc..18329060a 100644 --- a/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleService.cs +++ b/src/Squidex.Domain.Apps.Core.Operations/HandleRules/RuleService.cs @@ -60,7 +60,7 @@ namespace Squidex.Domain.Apps.Core.HandleRules { return null; } - + if (!(@event.Payload is AppEvent appEvent)) { return null;