update functionallity for security groups

This commit is contained in:
vfedosevich 2013-08-21 12:58:20 +03:00
parent 53dc8efa5d
commit 14e505a502
6 changed files with 311 additions and 9 deletions

View file

@ -368,6 +368,14 @@ namespace WebsitePanel.Providers.HostedSolution
group.Invoke("Add", user.Path);
}
public static void RemoveUserFromGroup(string userPath, string groupPath)
{
DirectoryEntry user = new DirectoryEntry(userPath);
DirectoryEntry group = new DirectoryEntry(groupPath);
group.Invoke("Remove", user.Path);
}
public static bool AdObjectExists(string path)
{
return DirectoryEntry.Exists(path);