Browse Source
Deactivate rule if disabled
The change deactivates the rule if a user has disabled it.
pull/330/head
Keith W
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
5 additions and
0 deletions
-
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(rule, nameof(rule)); |
|
|
Guard.NotNull(@event, nameof(@event)); |
|
|
Guard.NotNull(@event, nameof(@event)); |
|
|
|
|
|
|
|
|
|
|
|
if (!rule.IsEnabled) |
|
|
|
|
|
{ |
|
|
|
|
|
return null; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (!(@event.Payload is AppEvent appEvent)) |
|
|
if (!(@event.Payload is AppEvent appEvent)) |
|
|
{ |
|
|
{ |
|
|
return null; |
|
|
return null; |
|
|
|