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.
This commit is contained in:
Gary Sharp
2014-04-11 19:56:17 +10:00
parent 3238a916a2
commit e984221c95
14 changed files with 156 additions and 77 deletions
@@ -23,7 +23,7 @@ namespace Disco.BI.Extensions
if (documentTemplate == null) 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); comments = string.Format("Uploaded: {0:s}", UniqueIdentifier.TimeStamp);
} }
else else
@@ -68,7 +68,7 @@ namespace Disco.BI.Extensions
} }
public static string RepositoryFilename(this UserAttachment ua, DiscoDataContext Database) 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) 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) 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) public static void RepositoryDelete(this DeviceAttachment da, DiscoDataContext Database)
+25 -1
View File
@@ -388,7 +388,7 @@ DELETE [Users] WHERE [Id]=@IdExisting;";
throw new InvalidOperationException("Unable to determine the Domains NetBIOS Name"); throw new InvalidOperationException("Unable to determine the Domains NetBIOS Name");
// MIGRATE SETTINGS // MIGRATE SETTINGS
// Authorization Roles // Authorization Roles
foreach (var authRole in Database.AuthorizationRoles.Where(ar => ar.SubjectIds != null).ToList()) foreach (var authRole in Database.AuthorizationRoles.Where(ar => ar.SubjectIds != null).ToList())
{ {
@@ -413,6 +413,30 @@ DELETE [Users] WHERE [Id]=@IdExisting;";
} }
Database.SaveChanges(); 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 // MIGRATE DEVICES
foreach (var device in Database.Devices.Where(d => d.DeviceDomainId != null && !d.DeviceDomainId.Contains(@"\")).ToList()) foreach (var device in Database.Devices.Where(d => d.DeviceDomainId != null && !d.DeviceDomainId.Contains(@"\")).ToList())
{ {
@@ -12,6 +12,7 @@ namespace Disco.Models.Interop.ActiveDirectory
public string CommonName { get; set; } public string CommonName { get; set; }
public string Name { get; set; } public string Name { get; set; }
public string DisplayName { get { return this.Name; } }
public List<string> MemberOf { get; set; } public List<string> MemberOf { get; set; }
@@ -15,6 +15,7 @@ namespace Disco.Models.Interop.ActiveDirectory
public string Path { get; set; } public string Path { get; set; }
public string Name { get; set; } public string Name { get; set; }
public string DisplayName { get { return this.Name; } }
public string DnsName { get; set; } public string DnsName { get; set; }
public Guid NetbootGUID { get; set; } public Guid NetbootGUID { get; set; }
@@ -11,5 +11,6 @@ namespace Disco.Models.Interop.ActiveDirectory
string NetBiosId { get; } string NetBiosId { get; }
string Name { get; set; } string Name { get; set; }
string DisplayName { get; }
} }
} }
@@ -5,7 +5,7 @@ namespace Disco.Models.Services.Authorization
{ {
public interface IRoleToken public interface IRoleToken
{ {
AuthorizationRole Role { get; set; } AuthorizationRole Role { get; }
List<string> SubjectIds { get; set; } List<string> SubjectIds { get; }
} }
} }
@@ -263,13 +263,26 @@ namespace Disco.Services.Interop.ActiveDirectory
if (string.IsNullOrWhiteSpace(Term)) if (string.IsNullOrWhiteSpace(Term))
throw new ArgumentNullException("Term"); throw new ArgumentNullException("Term");
// Apply Domain Restriction
ActiveDirectoryDomain searchDomain = null;
Term = ApplySearchTermDomainRestriction(Term, out searchDomain);
if (string.IsNullOrWhiteSpace(Term))
return Enumerable.Empty<ActiveDirectoryUserAccount>();
string ldapFilter = string.Format("(&(objectCategory=Person)(objectClass=user)(|(sAMAccountName=*{0}*)(displayName=*{0}*)))", ADInterop.EscapeLdapQuery(Term)); string ldapFilter = string.Format("(&(objectCategory=Person)(objectClass=user)(|(sAMAccountName=*{0}*)(displayName=*{0}*)))", ADInterop.EscapeLdapQuery(Term));
string[] loadProperites = (AdditionalProperties != null && AdditionalProperties.Length > 0) string[] loadProperites = (AdditionalProperties != null && AdditionalProperties.Length > 0)
? UserLoadProperties.Concat(AdditionalProperties).ToArray() ? UserLoadProperties.Concat(AdditionalProperties).ToArray()
: UserLoadProperties; : UserLoadProperties;
return ADInterop.SearchScope(ldapFilter, resultLimit, loadProperites).Select(result => result.AsUserAccount(AdditionalProperties)); IEnumerable<ActiveDirectorySearchResult> 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) private static ActiveDirectoryUserAccount AsUserAccount(this ActiveDirectorySearchResult item, string[] AdditionalProperties)
@@ -380,9 +393,22 @@ namespace Disco.Services.Interop.ActiveDirectory
if (string.IsNullOrWhiteSpace(Term)) if (string.IsNullOrWhiteSpace(Term))
throw new ArgumentNullException("Term"); throw new ArgumentNullException("Term");
// Apply Domain Restriction
ActiveDirectoryDomain searchDomain = null;
Term = ApplySearchTermDomainRestriction(Term, out searchDomain);
if (string.IsNullOrWhiteSpace(Term))
return Enumerable.Empty<ActiveDirectoryGroup>();
string ldapFilter = string.Format("(&(objectCategory=Group)(|(sAMAccountName=*{0}*)(name=*{0}*)(cn=*{0}*)))", ADInterop.EscapeLdapQuery(Term)); 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<ActiveDirectorySearchResult> 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) private static ActiveDirectoryGroup AsGroup(this ActiveDirectorySearchResult item)
@@ -396,7 +422,7 @@ namespace Disco.Services.Interop.ActiveDirectory
return new ActiveDirectoryGroup() return new ActiveDirectoryGroup()
{ {
Domain = item.Domain.DnsName, Domain = item.Domain.NetBiosName,
Name = name, Name = name,
DistinguishedName = distinguishedName, DistinguishedName = distinguishedName,
CommonName = cn, CommonName = cn,
@@ -416,7 +442,7 @@ namespace Disco.Services.Interop.ActiveDirectory
return new ActiveDirectoryGroup() return new ActiveDirectoryGroup()
{ {
Domain = Domain.DnsName, Domain = Domain.NetBiosName,
Name = name, Name = name,
DistinguishedName = distinguishedName, DistinguishedName = distinguishedName,
CommonName = cn, CommonName = cn,
@@ -525,6 +551,31 @@ namespace Disco.Services.Interop.ActiveDirectory
return ADInterop.SearchAll(domains, ldapFilter, SingleSearchResult, LoadProperties); 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 #endregion
} }
@@ -24,13 +24,13 @@ namespace Disco.Services.Interop.ActiveDirectory.Internal
if (!groups.Contains(group)) if (!groups.Contains(group))
{ {
groups.Add(group); groups.Add(group);
yield return group.SamAccountName; yield return group.NetBiosId;
} }
} }
public static IEnumerable<string> GetGroups(string DistinguishedName) public static IEnumerable<string> GetGroups(string DistinguishedName)
{ {
foreach (var group in GetGroupsRecursive(DistinguishedName, new Stack<ActiveDirectoryGroup>())) foreach (var group in GetGroupsRecursive(DistinguishedName, new Stack<ActiveDirectoryGroup>()))
yield return group.SamAccountName; yield return group.NetBiosId;
} }
public static string GetGroupsDistinguishedNameForSecurityIdentifier(string SecurityIdentifier) public static string GetGroupsDistinguishedNameForSecurityIdentifier(string SecurityIdentifier)
{ {
@@ -16,8 +16,8 @@ namespace Disco.Web.Areas.API.Models.AuthorizationRole
{ {
return new Models.AuthorizationRole.SubjectItem() return new Models.AuthorizationRole.SubjectItem()
{ {
Id = ADObject.SamAccountName, Id = ADObject.NetBiosId,
Name = ADObject.Name, Name = ADObject.DisplayName,
Type = ADObject is ActiveDirectoryGroup ? "group" : "user" Type = ADObject is ActiveDirectoryGroup ? "group" : "user"
}; };
} }
@@ -17,7 +17,7 @@ namespace Disco.Web.Areas.API.Models.JobQueue
return new Models.JobQueue.SubjectItem() return new Models.JobQueue.SubjectItem()
{ {
Id = ADObject.SamAccountName, Id = ADObject.SamAccountName,
Name = ADObject.Name, Name = ADObject.DisplayName,
Type = ADObject is ActiveDirectoryGroup ? "group" : "user" Type = ADObject is ActiveDirectoryGroup ? "group" : "user"
}; };
} }
@@ -25,7 +25,7 @@ namespace Disco.Web.Areas.Config.Models.JobQueue
var item = new SubjectDescriptor() var item = new SubjectDescriptor()
{ {
Id = ADObject.SamAccountName, Id = ADObject.SamAccountName,
Name = ADObject.Name Name = ADObject.DisplayName
}; };
if (ADObject is ActiveDirectoryGroup) if (ADObject is ActiveDirectoryGroup)
@@ -131,7 +131,7 @@ namespace Disco.Web.Areas.Config.Models.SystemConfig
}).ToList(); }).ToList();
var loadForestServersTask = ActiveDirectory.LoadForestServersAsync(); var loadForestServersTask = ActiveDirectory.LoadForestServersAsync();
if (loadForestServersTask.Wait(TimeSpan.FromSeconds(3))) if (loadForestServersTask.Wait(TimeSpan.FromSeconds(1)))
{ {
m.ADForestServers = loadForestServersTask.Result; m.ADForestServers = loadForestServersTask.Result;
var configValue = config.ActiveDirectory.SearchEntireForest ?? true; var configValue = config.ActiveDirectory.SearchEntireForest ?? true;
@@ -213,7 +213,8 @@
@Html.CheckBoxFor(m => m.ADSearchEntireForest, new { disabled = "disabled" }) @Html.LabelFor(m => m.ADSearchEntireForest) @Html.CheckBoxFor(m => m.ADSearchEntireForest, new { disabled = "disabled" }) @Html.LabelFor(m => m.ADSearchEntireForest)
</div> </div>
<div style="padding: 0.7em 0.7em;" class="ui-state-highlight ui-corner-all"> <div style="padding: 0.7em 0.7em;" class="ui-state-highlight ui-corner-all">
<i class="fa fa-info-circle information"></i>&nbsp;Forest servers are being retrieved, try refreshing this page in a moment. <i class="fa fa-info-circle information"></i>&nbsp;Forest servers are currently being retrieved.
<br />Try refreshing this page in a moment.
</div> </div>
} }
else else
@@ -787,11 +787,11 @@ WriteLiteral(">\r\n <i");
WriteLiteral(" class=\"fa fa-info-circle information\""); WriteLiteral(" class=\"fa fa-info-circle information\"");
WriteLiteral("></i>&nbsp;Forest servers are being retrieved, try refreshing this page in a mome" + WriteLiteral("></i>&nbsp;Forest servers are currently being retrieved.\r\n " +
"nt.\r\n </div>\r\n"); " <br />Try refreshing this page in a moment.\r\n </div>\r\n");
#line 218 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 219 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
} }
else else
{ {
@@ -805,13 +805,13 @@ WriteLiteral("></i>&nbsp;Forest servers are being retrieved, try refreshing this
WriteLiteral(" <div>\r\n"); WriteLiteral(" <div>\r\n");
#line 225 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 226 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
#line default #line default
#line hidden #line hidden
#line 225 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 226 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
if (!canSearchEntireForest) if (!canSearchEntireForest)
{ {
@@ -819,27 +819,27 @@ WriteLiteral(" <div>\r\n");
#line default #line default
#line hidden #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" })); Write(Html.CheckBoxFor(m => m.ADSearchEntireForest, new { disabled = "disabled" }));
#line default #line default
#line hidden #line hidden
#line 227 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 228 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
#line default #line default
#line hidden #line hidden
#line 227 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 228 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
Write(Html.LabelFor(m => m.ADSearchEntireForest)); Write(Html.LabelFor(m => m.ADSearchEntireForest));
#line default #line default
#line hidden #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("></i>&nbsp;Disco will not search entire forests which consist of more than "); WriteLiteral("></i>&nbsp;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); Write(Disco.Services.Interop.ActiveDirectory.ActiveDirectory.MaxForestServerSearch);
@@ -868,7 +868,7 @@ WriteLiteral(" servers. Only servers within this site will be searched.\r\n
" </div>\r\n"); " </div>\r\n");
#line 231 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 232 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
} }
else else
{ {
@@ -877,40 +877,40 @@ WriteLiteral(" servers. Only servers within this site will be searched.\r\n
#line default #line default
#line hidden #line hidden
#line 234 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 235 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
Write(Html.CheckBoxFor(m => m.ADSearchEntireForest)); Write(Html.CheckBoxFor(m => m.ADSearchEntireForest));
#line default #line default
#line hidden #line hidden
#line 234 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 235 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
#line default #line default
#line hidden #line hidden
#line 234 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 235 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
Write(Html.LabelFor(m => m.ADSearchEntireForest)); Write(Html.LabelFor(m => m.ADSearchEntireForest));
#line default #line default
#line hidden #line hidden
#line 234 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 235 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
#line default #line default
#line hidden #line hidden
#line 234 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 235 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
Write(AjaxHelpers.AjaxLoader()); Write(AjaxHelpers.AjaxLoader());
#line default #line default
#line hidden #line hidden
#line 234 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 235 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
@@ -929,7 +929,7 @@ WriteLiteral(" <script>\r\n
"Helper($(\'#ADSearchEntireForest\'), null, \'"); "Helper($(\'#ADSearchEntireForest\'), null, \'");
#line 240 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 241 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
Write(Url.Action(MVC.API.System.UpdateActiveDirectorySearchEntireForest())); Write(Url.Action(MVC.API.System.UpdateActiveDirectorySearchEntireForest()));
@@ -939,7 +939,7 @@ WriteLiteral("\', \'SearchEntireForest\');\r\n })
" </script>\r\n"); " </script>\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(" </div>\r\n"); WriteLiteral(" </div>\r\n");
#line 245 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 246 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
} }
else else
{ {
@@ -961,7 +961,7 @@ WriteLiteral(" <div>\r\n");
WriteLiteral(" "); 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" })); Write(Html.CheckBoxFor(m => m.ADSearchEntireForest, new { disabled = "disabled" }));
@@ -970,7 +970,7 @@ WriteLiteral(" ");
WriteLiteral(" "); WriteLiteral(" ");
#line 249 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 250 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
Write(Html.LabelFor(m => m.ADSearchEntireForest)); Write(Html.LabelFor(m => m.ADSearchEntireForest));
@@ -985,7 +985,7 @@ WriteLiteral(">\r\n If this setting is enabled, Disco
" </div>\r\n </div>\r\n"); " </div>\r\n </div>\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"); WriteLiteral(">\r\n");
#line 259 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 260 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
#line default #line default
#line hidden #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)) foreach (var server in Model.ADForestServers.OrderBy(s => s))
{ {
@@ -1015,7 +1015,7 @@ WriteLiteral(">\r\n");
WriteLiteral(" <li><code>"); WriteLiteral(" <li><code>");
#line 261 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 262 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
Write(server); Write(server);
@@ -1024,7 +1024,7 @@ WriteLiteral(" <li><code>");
WriteLiteral("</code> "); WriteLiteral("</code> ");
#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); Write(Model.ADSiteServers.Count(ss => ss.Item1.Name.Equals(server, StringComparison.InvariantCultureIgnoreCase)) > 0 ? "[Site Server]" : null);
@@ -1033,7 +1033,7 @@ WriteLiteral("</code> ");
WriteLiteral("</li>\r\n"); WriteLiteral("</li>\r\n");
#line 262 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 263 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
} }
@@ -1066,7 +1066,7 @@ WriteLiteral(@" </ul>
"); ");
#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 </th>\r\n <td>\r\n"); WriteLiteral(">Search Scope:\r\n </th>\r\n <td>\r\n");
#line 294 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 295 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
#line default #line default
#line hidden #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) if (Model.ADSearchContainers != null && Model.ADSearchContainers.Count > 0)
{ {
@@ -1102,13 +1102,13 @@ WriteLiteral(" id=\"Config_System_AD_SearchScope_DistinguishedNames\"");
WriteLiteral(">\r\n"); WriteLiteral(">\r\n");
#line 298 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 299 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
#line default #line default
#line hidden #line hidden
#line 298 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 299 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
foreach (var adContainer in Model.ADSearchContainers) foreach (var adContainer in Model.ADSearchContainers)
{ {
@@ -1120,7 +1120,7 @@ WriteLiteral(" <li");
WriteLiteral(" data-distinguishedname=\""); WriteLiteral(" data-distinguishedname=\"");
#line 300 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 301 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
Write(adContainer.Item1); Write(adContainer.Item1);
@@ -1131,7 +1131,7 @@ WriteLiteral("\"");
WriteLiteral("><code>"); WriteLiteral("><code>");
#line 300 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 301 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
Write(adContainer.Item3); Write(adContainer.Item3);
@@ -1140,7 +1140,7 @@ WriteLiteral("><code>");
WriteLiteral("</code></li>\r\n"); WriteLiteral("</code></li>\r\n");
#line 301 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 302 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
} }
@@ -1149,7 +1149,7 @@ WriteLiteral("</code></li>\r\n");
WriteLiteral(" </ul>\r\n"); WriteLiteral(" </ul>\r\n");
#line 303 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 304 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
} }
else else
{ {
@@ -1167,7 +1167,7 @@ WriteLiteral(">When searching, the entire domain will be queried. This is suitab
"gle-domain deployments.</div>\r\n"); "gle-domain deployments.</div>\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(" "); WriteLiteral(" ");
#line 309 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 310 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
if (canConfigAD) if (canConfigAD)
{ {
@@ -1211,13 +1211,13 @@ WriteLiteral(" class=\"organisationalUnitTree\"");
WriteLiteral(">\r\n </div>\r\n"); WriteLiteral(">\r\n </div>\r\n");
#line 318 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 319 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
#line default #line default
#line hidden #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))) using (Html.BeginForm(MVC.API.System.UpdateActiveDirectorySearchScope(null, redirect: true)))
{ {
} }
@@ -1262,7 +1262,7 @@ WriteLiteral(" <script>\r\n $(function
" $.getJSON(\'"); " $.getJSON(\'");
#line 369 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 370 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
Write(Url.Action(MVC.API.System.DomainOrganisationalUnits())); Write(Url.Action(MVC.API.System.DomainOrganisationalUnits()));
@@ -1307,7 +1307,7 @@ WriteLiteral("\', null, function (data) {\r\n\r\n\r\n
" });\r\n </script>\r\n"); " });\r\n </script>\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(" </td>\r\n </tr>\r\n </table>\r\n</div>\r\n"); WriteLiteral(" </td>\r\n </tr>\r\n </table>\r\n</div>\r\n");
#line 431 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 432 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
if (canConfigProxy) if (canConfigProxy)
{ {
using (Html.BeginForm(MVC.API.System.UpdateProxySettings())) using (Html.BeginForm(MVC.API.System.UpdateProxySettings()))
@@ -1341,7 +1341,7 @@ WriteLiteral(">Address:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 442 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 443 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
Write(Html.EditorFor(m => m.ProxyAddress)); Write(Html.EditorFor(m => m.ProxyAddress));
@@ -1352,7 +1352,7 @@ WriteLiteral("<br />\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 443 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 444 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
Write(Html.ValidationMessageFor(m => m.ProxyAddress)); Write(Html.ValidationMessageFor(m => m.ProxyAddress));
@@ -1368,7 +1368,7 @@ WriteLiteral(">Port:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 450 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 451 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
Write(Html.EditorFor(m => m.ProxyPort)); Write(Html.EditorFor(m => m.ProxyPort));
@@ -1379,7 +1379,7 @@ WriteLiteral("<br />\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 451 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 452 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
Write(Html.ValidationMessageFor(m => m.ProxyPort)); Write(Html.ValidationMessageFor(m => m.ProxyPort));
@@ -1395,7 +1395,7 @@ WriteLiteral(">Username:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 458 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 459 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
Write(Html.EditorFor(m => m.ProxyUsername)); Write(Html.EditorFor(m => m.ProxyUsername));
@@ -1406,7 +1406,7 @@ WriteLiteral("<br />\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 459 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 460 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
Write(Html.ValidationMessageFor(m => m.ProxyUsername)); Write(Html.ValidationMessageFor(m => m.ProxyUsername));
@@ -1422,7 +1422,7 @@ WriteLiteral(">Password:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 466 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 467 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
Write(Html.EditorFor(m => m.ProxyPassword)); Write(Html.EditorFor(m => m.ProxyPassword));
@@ -1433,7 +1433,7 @@ WriteLiteral("<br />\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 467 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 468 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
Write(Html.ValidationMessageFor(m => m.ProxyPassword)); Write(Html.ValidationMessageFor(m => m.ProxyPassword));
@@ -1455,7 +1455,7 @@ WriteLiteral(" value=\"Save Proxy Settings\"");
WriteLiteral(" />\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n"); WriteLiteral(" />\r\n </td>\r\n </tr>\r\n </table>\r\n </div>\r\n");
#line 479 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 480 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
} }
} }
else else
@@ -1480,7 +1480,7 @@ WriteLiteral(">Address:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 490 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 491 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
Write(Html.DisplayFor(m => m.ProxyAddress)); Write(Html.DisplayFor(m => m.ProxyAddress));
@@ -1496,7 +1496,7 @@ WriteLiteral(">Port:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 497 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 498 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
Write(Html.DisplayFor(m => m.ProxyPort)); Write(Html.DisplayFor(m => m.ProxyPort));
@@ -1512,7 +1512,7 @@ WriteLiteral(">Username:\r\n </th>\r\n <td>\r\n");
WriteLiteral(" "); WriteLiteral(" ");
#line 504 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml" #line 505 "..\..\Areas\Config\Views\SystemConfig\Index.cshtml"
Write(Html.DisplayFor(m => m.ProxyUsername)); Write(Html.DisplayFor(m => m.ProxyUsername));
@@ -1527,7 +1527,7 @@ WriteLiteral(">Password:\r\n </th>\r\n <td>*******
"</td>\r\n </tr>\r\n </table>\r\n </div>\r\n"); "</td>\r\n </tr>\r\n </table>\r\n </div>\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(" "); 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())); Write(Html.ActionLinkButton("Update Device Last Network Logons", MVC.API.System.UpdateLastNetworkLogonDates()));