Skip to content

Commit ed628d2

Browse files
committed
2 parents c08f5b6 + daa467b commit ed628d2

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

eFormAPI/Installation/AllowMultipleVersionsBundle/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
// General Information about an assembly is controlled through the following
66
// set of attributes. Change these attribute values to modify the information
77
// associated with an assembly.
8-
[assembly: AssemblyTitle("AlowMultipleVersionsBundle")]
8+
[assembly: AssemblyTitle("Eform Angular Frontend")]
99
[assembly: AssemblyDescription("")]
1010
[assembly: AssemblyConfiguration("")]
1111
[assembly: AssemblyCompany("")]
12-
[assembly: AssemblyProduct("AlowMultipleVersionsBundle")]
12+
[assembly: AssemblyProduct("Eform Angular Frontend")]
1313
[assembly: AssemblyCopyright("Copyright © 2017")]
1414
[assembly: AssemblyTrademark("")]
1515
[assembly: AssemblyCulture("")]

eFormAPI/Installation/CustomActions/CustomAction.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using Microsoft.Web.Administration;
99
using System.Collections.Generic;
1010
using System.Management;
11+
using System.Security.AccessControl;
1112
using System.Threading;
1213
using System.Threading.Tasks;
1314

@@ -124,6 +125,8 @@ public static ActionResult InstallCA(Session session)
124125
RunProcess(Path.Combine(installFolder, "letsencrypt\\letsencrypt.exe"), $"--plugin iissite --siteid { siteId } --accepttos --usedefaulttaskuser");
125126
}
126127

128+
CongigureSecurity(clientLocation);
129+
CongigureSecurity(webApiLocation);
127130
//DeleteDirectory(Path.Combine(installFolder, "letsencrypt"));
128131
IncrementProgressBar(session);
129132

@@ -218,6 +221,9 @@ public static ActionResult UpdateCA(Session session)
218221
ControlSites(customerNumber, domain, apiPort, uiPort, true);
219222
IncrementProgressBar(session);
220223

224+
CongigureSecurity(uiIisDir);
225+
CongigureSecurity(webApiLocation);
226+
221227
DeleteDirectory(session.CustomActionData["INSTALLFOLDER"]);
222228
return ActionResult.Success;
223229
}
@@ -327,6 +333,18 @@ private static void RenameFolders(string location, string apiName, string uiName
327333
Directory.Move(Path.Combine(location, "eform-client"), uiName);
328334
}
329335

336+
public static void CongigureSecurity(string folder)
337+
{
338+
var dInfo = new DirectoryInfo(folder);
339+
340+
var dSecurity = dInfo.GetAccessControl();
341+
342+
dSecurity.AddAccessRule(new FileSystemAccessRule("IUSR", FileSystemRights.FullControl, AccessControlType.Allow));
343+
dSecurity.AddAccessRule(new FileSystemAccessRule("IIS_IUSRS", FileSystemRights.FullControl, AccessControlType.Allow));
344+
345+
dInfo.SetAccessControl(dSecurity);
346+
}
347+
330348
private static void BuildAngularApp(string appLocation)
331349
{
332350
Session.Log("BuildAngularApp -> npm install");

0 commit comments

Comments
 (0)