Update #42: AD Migration

Refactor to target specific Domain Controllers, with failover.
This commit is contained in:
Gary Sharp
2014-04-21 21:43:13 +10:00
parent 43fc622121
commit 09c2a24222
98 changed files with 3808 additions and 3271 deletions
@@ -5,6 +5,7 @@ using System.Web;
using System.Web.Mvc;
using Disco.Services.Plugins;
using Disco.Models.UI.Config.DeviceProfile;
using Disco.Services.Interop.ActiveDirectory;
namespace Disco.Web.Areas.Config.Models.DeviceProfile
{
@@ -15,6 +16,23 @@ namespace Disco.Web.Areas.Config.Models.DeviceProfile
public Disco.Models.BI.Config.OrganisationAddress DefaultOrganisationAddress { get; set; }
public List<Disco.Models.BI.Config.OrganisationAddress> OrganisationAddresses { get; set; }
public string FriendlyOrganisationalUnitName
{
get
{
if (string.IsNullOrEmpty(this.DeviceProfile.OrganisationalUnit))
{
var domain = ActiveDirectory.Context.PrimaryDomain;
return domain.FriendlyDistinguishedNamePath(domain.DefaultComputerContainer);
}
else
{
var domain = ActiveDirectory.Context.GetDomainFromDistinguishedName(this.DeviceProfile.OrganisationalUnit);
return domain.FriendlyDistinguishedNamePath(this.DeviceProfile.OrganisationalUnit);
}
}
}
public List<PluginFeatureManifest> CertificateProviders { get; set; }
public int DeviceCount { get; set; }