Permissions & Authorization for Users #24

Initial Release; Includes Database and MVC refactoring
This commit is contained in:
Gary Sharp
2013-10-10 19:13:16 +11:00
parent 172ce5524a
commit a099d68915
458 changed files with 40221 additions and 12130 deletions
@@ -6,37 +6,24 @@ using Disco.Models.Repository;
namespace Disco.Models.Interop.ActiveDirectory
{
public class ActiveDirectoryMachineAccount
public class ActiveDirectoryMachineAccount : IActiveDirectoryObject
{
public string DistinguishedName { get; set; }
public string DnsName { get; set; }
public string Domain { get; set; }
public string Name { get; set; }
public Guid NetbootGUID { get; set; }
public string ObjectSid { get; set; }
public string SecurityIdentifier { get; set; }
public string Path { get; set; }
public string sAMAccountName { get; set; }
public string SamAccountName { get; set; }
public bool IsCriticalSystemObject { get; set; }
public Dictionary<string, object[]> LoadedProperties { get; set; }
public string ParentDistinguishedName
{
get
{
// Determine Parent
if (!string.IsNullOrWhiteSpace(DistinguishedName))
return DistinguishedName.Substring(0, DistinguishedName.IndexOf(",DC=")).Substring(DistinguishedName.IndexOf(",") + 1);
else
return null;
}
}
public User ToRepositoryUser()
{
return new User
{
Id = this.sAMAccountName,
Type = "Computer",
Id = this.SamAccountName,
DisplayName = this.Name
};
}