Skip to content

Commit 5cb3c1f

Browse files
committed
User group setting and validation.
1 parent f7fc640 commit 5cb3c1f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Umbraco.Forms.Integrations.Automation.Zapier/ZapierWorkflow.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.Configuration;
34
using System.Net.Http;
45

56
using Umbraco.Forms.Core;
@@ -13,6 +14,8 @@ namespace Umbraco.Forms.Integrations.Automation.Zapier
1314
{
1415
public class ZapierWorkflow : WorkflowType
1516
{
17+
private const string UserGroup = "Umbraco.Cms.Integrations.Automation.Zapier.UserGroup";
18+
1619
private readonly IUmbracoContextAccessor _umbracoContextAccessor;
1720

1821
public ZapierWorkflow(IUmbracoContextAccessor umbracoContextAccessor)
@@ -76,6 +79,9 @@ public override List<Exception> ValidateSettings()
7679
var validator = new WebHookValidator();
7780
validator.IsValid(WebHookUri, ref exceptions);
7881

82+
if(string.IsNullOrEmpty(ConfigurationManager.AppSettings[UserGroup]))
83+
exceptions.Add(new Exception("User group setting is required."));
84+
7985
return exceptions;
8086
}
8187

0 commit comments

Comments
 (0)