update functionallity for security groups

This commit is contained in:
vfedosevich 2013-08-21 18:24:45 +03:00
parent 14e505a502
commit 52cf12187f
18 changed files with 1849 additions and 979 deletions

View file

@ -349,6 +349,11 @@ namespace WebsitePanel.Providers.HostedSolution
}
public static void CreateGroup(string path, string group)
{
CreateGroup(path, group, "");
}
public static void CreateGroup(string path, string group, string manager)
{
DirectoryEntry currentADObject = new DirectoryEntry(path);
@ -357,6 +362,12 @@ namespace WebsitePanel.Providers.HostedSolution
newGroupObject.Properties[ADAttributes.SAMAccountName].Add(group);
newGroupObject.Properties[ADAttributes.GroupType].Add(-2147483640);
if (!string.IsNullOrEmpty(manager))
{
newGroupObject.Properties[ADAttributes.Manager].Add(manager);
}
newGroupObject.CommitChanges();
}