From e984221c9524582461b29b4fdc0a87d3fcd4faf4 Mon Sep 17 00:00:00 2001 From: Gary Sharp Date: Fri, 11 Apr 2014 19:56:17 +1000 Subject: [PATCH] Bug Fix: User Attachment Refs, AD Group Domain User Attachments updated in the DataStore to reflect new UserId (which includes the domain); AD Groups were using DnsName instead of NetBiosName. --- .../BI/Extensions/AttachmentExtensions.cs | 6 +- Disco.Data/Repository/DiscoDataSeeder.cs | 26 +++- .../ActiveDirectory/ActiveDirectoryGroup.cs | 1 + .../ActiveDirectoryMachineAccount.cs | 1 + .../ActiveDirectory/IActiveDirectoryObject.cs | 1 + .../Services/Authorization/IRoleToken.cs | 6 +- .../ActiveDirectory/ActiveDirectory.cs | 59 ++++++++- .../ActiveDirectory/Internal/ADGroupCache.cs | 4 +- .../Models/AuthorizationRole/SubjectItem.cs | 4 +- .../Areas/API/Models/JobQueue/SubjectItem.cs | 2 +- .../Areas/Config/Models/JobQueue/ShowModel.cs | 2 +- .../Config/Models/SystemConfig/IndexModel.cs | 2 +- .../Config/Views/SystemConfig/Index.cshtml | 3 +- .../Views/SystemConfig/Index.generated.cs | 116 +++++++++--------- 14 files changed, 156 insertions(+), 77 deletions(-) diff --git a/Disco.BI/BI/Extensions/AttachmentExtensions.cs b/Disco.BI/BI/Extensions/AttachmentExtensions.cs index 3e336c2c..c2c5ca4a 100644 --- a/Disco.BI/BI/Extensions/AttachmentExtensions.cs +++ b/Disco.BI/BI/Extensions/AttachmentExtensions.cs @@ -23,7 +23,7 @@ namespace Disco.BI.Extensions if (documentTemplate == null) { - filename = string.Format("{0}_{1:yyyyMMdd-HHmmss}.pdf", UniqueIdentifier.DataId, UniqueIdentifier.TimeStamp); + filename = string.Format("{0}_{1:yyyyMMdd-HHmmss}.pdf", UniqueIdentifier.DataId.Replace('\\', '_'), UniqueIdentifier.TimeStamp); comments = string.Format("Uploaded: {0:s}", UniqueIdentifier.TimeStamp); } else @@ -68,7 +68,7 @@ namespace Disco.BI.Extensions } public static string RepositoryFilename(this UserAttachment ua, DiscoDataContext Database) { - return Path.Combine(DataStore.CreateLocation(Database, "UserAttachments", ua.Timestamp), string.Format("{0}_{1}_file", ua.UserId, ua.Id)); + return Path.Combine(DataStore.CreateLocation(Database, "UserAttachments", ua.Timestamp), string.Format("{0}_{1}_file", ua.UserId.Replace('\\', '_'), ua.Id)); } private static string RepositoryThumbnailFilenameInternal(string DirectoryPath, string Filename) @@ -85,7 +85,7 @@ namespace Disco.BI.Extensions } public static string RepositoryThumbnailFilename(this UserAttachment ua, DiscoDataContext Database) { - return RepositoryThumbnailFilenameInternal(DataStore.CreateLocation(Database, "UserAttachments", ua.Timestamp), string.Format("{0}_{1}_thumb.jpg", ua.UserId, ua.Id)); + return RepositoryThumbnailFilenameInternal(DataStore.CreateLocation(Database, "UserAttachments", ua.Timestamp), string.Format("{0}_{1}_thumb.jpg", ua.UserId.Replace('\\', '_'), ua.Id)); } public static void RepositoryDelete(this DeviceAttachment da, DiscoDataContext Database) diff --git a/Disco.Data/Repository/DiscoDataSeeder.cs b/Disco.Data/Repository/DiscoDataSeeder.cs index c5c17bc5..7e000a8e 100644 --- a/Disco.Data/Repository/DiscoDataSeeder.cs +++ b/Disco.Data/Repository/DiscoDataSeeder.cs @@ -388,7 +388,7 @@ DELETE [Users] WHERE [Id]=@IdExisting;"; throw new InvalidOperationException("Unable to determine the Domains NetBIOS Name"); // MIGRATE SETTINGS - + // Authorization Roles foreach (var authRole in Database.AuthorizationRoles.Where(ar => ar.SubjectIds != null).ToList()) { @@ -413,6 +413,30 @@ DELETE [Users] WHERE [Id]=@IdExisting;"; } Database.SaveChanges(); + // MIGRATE Document Templates + var dataStoreLocation = Database.ConfigurationItems.Where(ci => ci.Scope == "System" && ci.Key == "DataStoreLocation").Select(ci => ci.Value).FirstOrDefault(); + if (!string.IsNullOrWhiteSpace(dataStoreLocation) && System.IO.Directory.Exists(dataStoreLocation)) + { + string filePrefix = string.Format("{0}_", netBiosName); + + var userAttachmentsDirectory = System.IO.Path.Combine(dataStoreLocation, "UserAttachments"); + if (System.IO.Directory.Exists(userAttachmentsDirectory)) + { + var files = System.IO.Directory.EnumerateFiles(userAttachmentsDirectory, "*.*", System.IO.SearchOption.AllDirectories) + .Where(p => !p.StartsWith(filePrefix, StringComparison.InvariantCultureIgnoreCase) && (p.EndsWith("_thumb.jpg") || p.EndsWith("_file"))).ToList(); + + foreach (var file in files) + { + try + { + var renameFile = System.IO.Path.Combine(System.IO.Path.GetDirectoryName(file), string.Concat(filePrefix, System.IO.Path.GetFileName(file))); + System.IO.File.Move(file, renameFile); + } + catch (Exception) { /* Ignore Errors */ } + } + } + } + // MIGRATE DEVICES foreach (var device in Database.Devices.Where(d => d.DeviceDomainId != null && !d.DeviceDomainId.Contains(@"\")).ToList()) { diff --git a/Disco.Models/Interop/ActiveDirectory/ActiveDirectoryGroup.cs b/Disco.Models/Interop/ActiveDirectory/ActiveDirectoryGroup.cs index bc0ed614..f922be3f 100644 --- a/Disco.Models/Interop/ActiveDirectory/ActiveDirectoryGroup.cs +++ b/Disco.Models/Interop/ActiveDirectory/ActiveDirectoryGroup.cs @@ -12,6 +12,7 @@ namespace Disco.Models.Interop.ActiveDirectory public string CommonName { get; set; } public string Name { get; set; } + public string DisplayName { get { return this.Name; } } public List MemberOf { get; set; } diff --git a/Disco.Models/Interop/ActiveDirectory/ActiveDirectoryMachineAccount.cs b/Disco.Models/Interop/ActiveDirectory/ActiveDirectoryMachineAccount.cs index 0ed7dcab..db8df186 100644 --- a/Disco.Models/Interop/ActiveDirectory/ActiveDirectoryMachineAccount.cs +++ b/Disco.Models/Interop/ActiveDirectory/ActiveDirectoryMachineAccount.cs @@ -15,6 +15,7 @@ namespace Disco.Models.Interop.ActiveDirectory public string Path { get; set; } public string Name { get; set; } + public string DisplayName { get { return this.Name; } } public string DnsName { get; set; } public Guid NetbootGUID { get; set; } diff --git a/Disco.Models/Interop/ActiveDirectory/IActiveDirectoryObject.cs b/Disco.Models/Interop/ActiveDirectory/IActiveDirectoryObject.cs index cd880385..533c02ed 100644 --- a/Disco.Models/Interop/ActiveDirectory/IActiveDirectoryObject.cs +++ b/Disco.Models/Interop/ActiveDirectory/IActiveDirectoryObject.cs @@ -11,5 +11,6 @@ namespace Disco.Models.Interop.ActiveDirectory string NetBiosId { get; } string Name { get; set; } + string DisplayName { get; } } } diff --git a/Disco.Models/Services/Authorization/IRoleToken.cs b/Disco.Models/Services/Authorization/IRoleToken.cs index a80481fa..55aad76a 100644 --- a/Disco.Models/Services/Authorization/IRoleToken.cs +++ b/Disco.Models/Services/Authorization/IRoleToken.cs @@ -5,7 +5,7 @@ namespace Disco.Models.Services.Authorization { public interface IRoleToken { - AuthorizationRole Role { get; set; } - List SubjectIds { get; set; } + AuthorizationRole Role { get; } + List SubjectIds { get; } } -} +} \ No newline at end of file diff --git a/Disco.Services/Interop/ActiveDirectory/ActiveDirectory.cs b/Disco.Services/Interop/ActiveDirectory/ActiveDirectory.cs index 7c75f604..f8d36d1f 100644 --- a/Disco.Services/Interop/ActiveDirectory/ActiveDirectory.cs +++ b/Disco.Services/Interop/ActiveDirectory/ActiveDirectory.cs @@ -263,13 +263,26 @@ namespace Disco.Services.Interop.ActiveDirectory if (string.IsNullOrWhiteSpace(Term)) throw new ArgumentNullException("Term"); + // Apply Domain Restriction + ActiveDirectoryDomain searchDomain = null; + Term = ApplySearchTermDomainRestriction(Term, out searchDomain); + + if (string.IsNullOrWhiteSpace(Term)) + return Enumerable.Empty(); + string ldapFilter = string.Format("(&(objectCategory=Person)(objectClass=user)(|(sAMAccountName=*{0}*)(displayName=*{0}*)))", ADInterop.EscapeLdapQuery(Term)); string[] loadProperites = (AdditionalProperties != null && AdditionalProperties.Length > 0) ? UserLoadProperties.Concat(AdditionalProperties).ToArray() : UserLoadProperties; - return ADInterop.SearchScope(ldapFilter, resultLimit, loadProperites).Select(result => result.AsUserAccount(AdditionalProperties)); + IEnumerable searchResults; + if (searchDomain == null) + searchResults = ADInterop.SearchScope(ldapFilter, resultLimit, loadProperites); + else + searchResults = ADInterop.SearchScope(searchDomain, ldapFilter, resultLimit, loadProperites); + + return searchResults.Select(result => result.AsUserAccount(AdditionalProperties)); } private static ActiveDirectoryUserAccount AsUserAccount(this ActiveDirectorySearchResult item, string[] AdditionalProperties) @@ -380,9 +393,22 @@ namespace Disco.Services.Interop.ActiveDirectory if (string.IsNullOrWhiteSpace(Term)) throw new ArgumentNullException("Term"); + // Apply Domain Restriction + ActiveDirectoryDomain searchDomain = null; + Term = ApplySearchTermDomainRestriction(Term, out searchDomain); + + if (string.IsNullOrWhiteSpace(Term)) + return Enumerable.Empty(); + string ldapFilter = string.Format("(&(objectCategory=Group)(|(sAMAccountName=*{0}*)(name=*{0}*)(cn=*{0}*)))", ADInterop.EscapeLdapQuery(Term)); - return ADInterop.SearchScope(ldapFilter, resultLimit, GroupLoadProperties).Select(result => result.AsGroup()); + IEnumerable searchResults; + if (searchDomain == null) + searchResults = ADInterop.SearchScope(ldapFilter, resultLimit, GroupLoadProperties); + else + searchResults = ADInterop.SearchScope(searchDomain, ldapFilter, resultLimit, GroupLoadProperties); + + return searchResults.Select(result => result.AsGroup()); } private static ActiveDirectoryGroup AsGroup(this ActiveDirectorySearchResult item) @@ -396,7 +422,7 @@ namespace Disco.Services.Interop.ActiveDirectory return new ActiveDirectoryGroup() { - Domain = item.Domain.DnsName, + Domain = item.Domain.NetBiosName, Name = name, DistinguishedName = distinguishedName, CommonName = cn, @@ -416,7 +442,7 @@ namespace Disco.Services.Interop.ActiveDirectory return new ActiveDirectoryGroup() { - Domain = Domain.DnsName, + Domain = Domain.NetBiosName, Name = name, DistinguishedName = distinguishedName, CommonName = cn, @@ -525,6 +551,31 @@ namespace Disco.Services.Interop.ActiveDirectory return ADInterop.SearchAll(domains, ldapFilter, SingleSearchResult, LoadProperties); } + private static string ApplySearchTermDomainRestriction(string Term, out ActiveDirectoryDomain Domain) + { + if (string.IsNullOrWhiteSpace(Term)) + throw new ArgumentNullException("Term"); + + var domainIndex = Term.IndexOf('\\'); + if (domainIndex >= 0) + { + var domain = Term.Substring(0, domainIndex); + + if (!ADInterop.TryGetDomainByNetBiosName(domain, out Domain)) + return null; // Domain not found - invalid search + + if (Term.Length > (domainIndex + 1)) + return Term.Substring(domainIndex + 1); + else + return null; // Domain only, no Term + } + else + { + Domain = null; + return Term; + } + } + #endregion } diff --git a/Disco.Services/Interop/ActiveDirectory/Internal/ADGroupCache.cs b/Disco.Services/Interop/ActiveDirectory/Internal/ADGroupCache.cs index fd4ef188..216b368a 100644 --- a/Disco.Services/Interop/ActiveDirectory/Internal/ADGroupCache.cs +++ b/Disco.Services/Interop/ActiveDirectory/Internal/ADGroupCache.cs @@ -24,13 +24,13 @@ namespace Disco.Services.Interop.ActiveDirectory.Internal if (!groups.Contains(group)) { groups.Add(group); - yield return group.SamAccountName; + yield return group.NetBiosId; } } public static IEnumerable GetGroups(string DistinguishedName) { foreach (var group in GetGroupsRecursive(DistinguishedName, new Stack())) - yield return group.SamAccountName; + yield return group.NetBiosId; } public static string GetGroupsDistinguishedNameForSecurityIdentifier(string SecurityIdentifier) { diff --git a/Disco.Web/Areas/API/Models/AuthorizationRole/SubjectItem.cs b/Disco.Web/Areas/API/Models/AuthorizationRole/SubjectItem.cs index f22f5728..cd71d093 100644 --- a/Disco.Web/Areas/API/Models/AuthorizationRole/SubjectItem.cs +++ b/Disco.Web/Areas/API/Models/AuthorizationRole/SubjectItem.cs @@ -16,8 +16,8 @@ namespace Disco.Web.Areas.API.Models.AuthorizationRole { return new Models.AuthorizationRole.SubjectItem() { - Id = ADObject.SamAccountName, - Name = ADObject.Name, + Id = ADObject.NetBiosId, + Name = ADObject.DisplayName, Type = ADObject is ActiveDirectoryGroup ? "group" : "user" }; } diff --git a/Disco.Web/Areas/API/Models/JobQueue/SubjectItem.cs b/Disco.Web/Areas/API/Models/JobQueue/SubjectItem.cs index fdd9ca99..d34e77a6 100644 --- a/Disco.Web/Areas/API/Models/JobQueue/SubjectItem.cs +++ b/Disco.Web/Areas/API/Models/JobQueue/SubjectItem.cs @@ -17,7 +17,7 @@ namespace Disco.Web.Areas.API.Models.JobQueue return new Models.JobQueue.SubjectItem() { Id = ADObject.SamAccountName, - Name = ADObject.Name, + Name = ADObject.DisplayName, Type = ADObject is ActiveDirectoryGroup ? "group" : "user" }; } diff --git a/Disco.Web/Areas/Config/Models/JobQueue/ShowModel.cs b/Disco.Web/Areas/Config/Models/JobQueue/ShowModel.cs index 65b03406..d57e2dd6 100644 --- a/Disco.Web/Areas/Config/Models/JobQueue/ShowModel.cs +++ b/Disco.Web/Areas/Config/Models/JobQueue/ShowModel.cs @@ -25,7 +25,7 @@ namespace Disco.Web.Areas.Config.Models.JobQueue var item = new SubjectDescriptor() { Id = ADObject.SamAccountName, - Name = ADObject.Name + Name = ADObject.DisplayName }; if (ADObject is ActiveDirectoryGroup) diff --git a/Disco.Web/Areas/Config/Models/SystemConfig/IndexModel.cs b/Disco.Web/Areas/Config/Models/SystemConfig/IndexModel.cs index 349467a8..cb28f570 100644 --- a/Disco.Web/Areas/Config/Models/SystemConfig/IndexModel.cs +++ b/Disco.Web/Areas/Config/Models/SystemConfig/IndexModel.cs @@ -131,7 +131,7 @@ namespace Disco.Web.Areas.Config.Models.SystemConfig }).ToList(); var loadForestServersTask = ActiveDirectory.LoadForestServersAsync(); - if (loadForestServersTask.Wait(TimeSpan.FromSeconds(3))) + if (loadForestServersTask.Wait(TimeSpan.FromSeconds(1))) { m.ADForestServers = loadForestServersTask.Result; var configValue = config.ActiveDirectory.SearchEntireForest ?? true; diff --git a/Disco.Web/Areas/Config/Views/SystemConfig/Index.cshtml b/Disco.Web/Areas/Config/Views/SystemConfig/Index.cshtml index 4911567a..0e4d627d 100644 --- a/Disco.Web/Areas/Config/Views/SystemConfig/Index.cshtml +++ b/Disco.Web/Areas/Config/Views/SystemConfig/Index.cshtml @@ -213,7 +213,8 @@ @Html.CheckBoxFor(m => m.ADSearchEntireForest, new { disabled = "disabled" }) @Html.LabelFor(m => m.ADSearchEntireForest)
-  Forest servers are being retrieved, try refreshing this page in a moment. +  Forest servers are currently being retrieved. +
Try refreshing this page in a moment.
} else diff --git a/Disco.Web/Areas/Config/Views/SystemConfig/Index.generated.cs b/Disco.Web/Areas/Config/Views/SystemConfig/Index.generated.cs index 1bdd3310..d87ec38e 100644 --- a/Disco.Web/Areas/Config/Views/SystemConfig/Index.generated.cs +++ b/Disco.Web/Areas/Config/Views/SystemConfig/Index.generated.cs @@ -787,11 +787,11 @@ WriteLiteral(">\r\n  Forest servers are being retrieved, try refreshing this page in a mome" + -"nt.\r\n \r\n"); +WriteLiteral("> Forest servers are currently being retrieved.\r\n " + +"
Try refreshing this page in a moment.\r\n \r\n"); - #line 218 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 219 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } else { @@ -805,13 +805,13 @@ WriteLiteral("> Forest servers are being retrieved, try refreshing this WriteLiteral("
\r\n"); - #line 225 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 226 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line default #line hidden - #line 225 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 226 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" if (!canSearchEntireForest) { @@ -819,27 +819,27 @@ WriteLiteral("
\r\n"); #line default #line hidden - #line 227 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 228 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.CheckBoxFor(m => m.ADSearchEntireForest, new { disabled = "disabled" })); #line default #line hidden - #line 227 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 228 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line default #line hidden - #line 227 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 228 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.LabelFor(m => m.ADSearchEntireForest)); #line default #line hidden - #line 227 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 228 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" @@ -858,7 +858,7 @@ WriteLiteral(" class=\"fa fa-exclamation-circle warning\""); WriteLiteral("> Disco will not search entire forests which consist of more than "); - #line 229 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 230 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Disco.Services.Interop.ActiveDirectory.ActiveDirectory.MaxForestServerSearch); @@ -868,7 +868,7 @@ WriteLiteral(" servers. Only servers within this site will be searched.\r\n "
\r\n"); - #line 231 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 232 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } else { @@ -877,40 +877,40 @@ WriteLiteral(" servers. Only servers within this site will be searched.\r\n #line default #line hidden - #line 234 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 235 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.CheckBoxFor(m => m.ADSearchEntireForest)); #line default #line hidden - #line 234 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 235 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line default #line hidden - #line 234 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 235 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.LabelFor(m => m.ADSearchEntireForest)); #line default #line hidden - #line 234 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 235 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line default #line hidden - #line 234 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 235 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(AjaxHelpers.AjaxLoader()); #line default #line hidden - #line 234 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 235 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" @@ -929,7 +929,7 @@ WriteLiteral(" \r\n"); - #line 243 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 244 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } @@ -948,7 +948,7 @@ WriteLiteral("\', \'SearchEntireForest\');\r\n }) WriteLiteral("
\r\n"); - #line 245 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 246 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } else { @@ -961,7 +961,7 @@ WriteLiteral("
\r\n"); WriteLiteral(" "); - #line 249 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 250 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.CheckBoxFor(m => m.ADSearchEntireForest, new { disabled = "disabled" })); @@ -970,7 +970,7 @@ WriteLiteral(" "); WriteLiteral(" "); - #line 249 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 250 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.LabelFor(m => m.ADSearchEntireForest)); @@ -985,7 +985,7 @@ WriteLiteral(">\r\n If this setting is enabled, Disco "
\r\n \r\n"); - #line 254 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 255 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } @@ -999,13 +999,13 @@ WriteLiteral(" id=\"Config_System_AD_ForestServers\""); WriteLiteral(">\r\n"); - #line 259 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 260 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line default #line hidden - #line 259 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 260 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" foreach (var server in Model.ADForestServers.OrderBy(s => s)) { @@ -1015,7 +1015,7 @@ WriteLiteral(">\r\n"); WriteLiteral("
  • "); - #line 261 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 262 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(server); @@ -1024,7 +1024,7 @@ WriteLiteral("
  • "); WriteLiteral(" "); - #line 261 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 262 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Model.ADSiteServers.Count(ss => ss.Item1.Name.Equals(server, StringComparison.InvariantCultureIgnoreCase)) > 0 ? "[Site Server]" : null); @@ -1033,7 +1033,7 @@ WriteLiteral(" "); WriteLiteral("
  • \r\n"); - #line 262 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 263 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } @@ -1066,7 +1066,7 @@ WriteLiteral(@" "); - #line 287 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 288 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } @@ -1079,13 +1079,13 @@ WriteLiteral(" style=\"width: 135px\""); WriteLiteral(">Search Scope:\r\n \r\n \r\n"); - #line 294 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 295 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line default #line hidden - #line 294 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 295 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" if (Model.ADSearchContainers != null && Model.ADSearchContainers.Count > 0) { @@ -1102,13 +1102,13 @@ WriteLiteral(" id=\"Config_System_AD_SearchScope_DistinguishedNames\""); WriteLiteral(">\r\n"); - #line 298 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 299 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line default #line hidden - #line 298 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 299 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" foreach (var adContainer in Model.ADSearchContainers) { @@ -1120,7 +1120,7 @@ WriteLiteral(" "); - #line 300 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 301 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(adContainer.Item3); @@ -1140,7 +1140,7 @@ WriteLiteral(">"); WriteLiteral("\r\n"); - #line 301 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 302 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } @@ -1149,7 +1149,7 @@ WriteLiteral("\r\n"); WriteLiteral(" \r\n"); - #line 303 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 304 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } else { @@ -1167,7 +1167,7 @@ WriteLiteral(">When searching, the entire domain will be queried. This is suitab "gle-domain deployments.\r\n"); - #line 308 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 309 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } @@ -1176,7 +1176,7 @@ WriteLiteral(">When searching, the entire domain will be queried. This is suitab WriteLiteral(" "); - #line 309 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 310 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" if (canConfigAD) { @@ -1211,13 +1211,13 @@ WriteLiteral(" class=\"organisationalUnitTree\""); WriteLiteral(">\r\n \r\n"); - #line 318 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 319 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line default #line hidden - #line 318 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 319 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" using (Html.BeginForm(MVC.API.System.UpdateActiveDirectorySearchScope(null, redirect: true))) { } @@ -1262,7 +1262,7 @@ WriteLiteral(" \r\n"); - #line 426 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 427 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } @@ -1316,7 +1316,7 @@ WriteLiteral("\', null, function (data) {\r\n\r\n\r\n WriteLiteral(" \r\n \r\n \r\n\r\n"); - #line 431 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 432 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" if (canConfigProxy) { using (Html.BeginForm(MVC.API.System.UpdateProxySettings())) @@ -1341,7 +1341,7 @@ WriteLiteral(">Address:\r\n \r\n \r\n"); WriteLiteral(" "); - #line 442 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 443 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.EditorFor(m => m.ProxyAddress)); @@ -1352,7 +1352,7 @@ WriteLiteral("
    \r\n"); WriteLiteral(" "); - #line 443 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 444 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.ValidationMessageFor(m => m.ProxyAddress)); @@ -1368,7 +1368,7 @@ WriteLiteral(">Port:\r\n \r\n \r\n"); WriteLiteral(" "); - #line 450 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 451 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.EditorFor(m => m.ProxyPort)); @@ -1379,7 +1379,7 @@ WriteLiteral("
    \r\n"); WriteLiteral(" "); - #line 451 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 452 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.ValidationMessageFor(m => m.ProxyPort)); @@ -1395,7 +1395,7 @@ WriteLiteral(">Username:\r\n \r\n \r\n"); WriteLiteral(" "); - #line 458 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 459 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.EditorFor(m => m.ProxyUsername)); @@ -1406,7 +1406,7 @@ WriteLiteral("
    \r\n"); WriteLiteral(" "); - #line 459 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 460 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.ValidationMessageFor(m => m.ProxyUsername)); @@ -1422,7 +1422,7 @@ WriteLiteral(">Password:\r\n \r\n \r\n"); WriteLiteral(" "); - #line 466 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 467 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.EditorFor(m => m.ProxyPassword)); @@ -1433,7 +1433,7 @@ WriteLiteral("
    \r\n"); WriteLiteral(" "); - #line 467 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 468 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.ValidationMessageFor(m => m.ProxyPassword)); @@ -1455,7 +1455,7 @@ WriteLiteral(" value=\"Save Proxy Settings\""); WriteLiteral(" />\r\n \r\n \r\n \r\n \r\n"); - #line 479 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 480 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } } else @@ -1480,7 +1480,7 @@ WriteLiteral(">Address:\r\n \r\n \r\n"); WriteLiteral(" "); - #line 490 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 491 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.DisplayFor(m => m.ProxyAddress)); @@ -1496,7 +1496,7 @@ WriteLiteral(">Port:\r\n \r\n \r\n"); WriteLiteral(" "); - #line 497 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 498 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.DisplayFor(m => m.ProxyPort)); @@ -1512,7 +1512,7 @@ WriteLiteral(">Username:\r\n \r\n \r\n"); WriteLiteral(" "); - #line 504 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 505 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.DisplayFor(m => m.ProxyUsername)); @@ -1527,7 +1527,7 @@ WriteLiteral(">Password:\r\n \r\n ******* "\r\n \r\n \r\n \r\n"); - #line 515 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 516 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" } @@ -1542,7 +1542,7 @@ WriteLiteral(">\r\n"); WriteLiteral(" "); - #line 517 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" + #line 518 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" Write(Html.ActionLinkButton("Update Device Last Network Logons", MVC.API.System.UpdateLastNetworkLogonDates()));