fixed bugs

This commit is contained in:
vfedosevich 2013-09-03 14:24:08 +03:00
parent f11d00d4fa
commit 34af4912e8
5 changed files with 28 additions and 5 deletions

View file

@ -45,6 +45,11 @@ namespace WebsitePanel.Providers.HostedSolution
}
public static string[] GetGroupObjects(string group, string objectType)
{
return GetGroupObjects(group, objectType, null);
}
public static string[] GetGroupObjects(string group, string objectType, DirectoryEntry entry)
{
List<string> rets = new List<string>();
@ -54,6 +59,11 @@ namespace WebsitePanel.Providers.HostedSolution
"(&(objectClass=" + objectType + "))"
};
if (entry != null)
{
deSearch.SearchRoot = entry;
}
SearchResultCollection srcObjects = deSearch.FindAll();
foreach (SearchResult srcObject in srcObjects)

View file

@ -918,8 +918,11 @@ namespace WebsitePanel.Providers.HostedSolution
throw new ArgumentNullException("groupName");
string path = GetGroupPath(organizationId, groupName);
string organizationPath = GetOrganizationPath(organizationId);
DirectoryEntry entry = ActiveDirectoryUtils.GetADObject(path);
DirectoryEntry organizationEntry = ActiveDirectoryUtils.GetADObject(organizationPath);
OrganizationSecurityGroup securityGroup = new OrganizationSecurityGroup();
@ -930,7 +933,7 @@ namespace WebsitePanel.Providers.HostedSolution
List<ExchangeAccount> members = new List<ExchangeAccount>();
foreach (string userPath in ActiveDirectoryUtils.GetGroupObjects(groupName, "user"))
foreach (string userPath in ActiveDirectoryUtils.GetGroupObjects(groupName, "user", organizationEntry))
{
OrganizationUser tmpUser = GetUser(userPath);
@ -941,7 +944,7 @@ namespace WebsitePanel.Providers.HostedSolution
});
}
foreach (string groupPath in ActiveDirectoryUtils.GetGroupObjects(groupName, "group"))
foreach (string groupPath in ActiveDirectoryUtils.GetGroupObjects(groupName, "group", organizationEntry))
{
DirectoryEntry groupEntry = ActiveDirectoryUtils.GetADObject(groupPath);

View file

@ -76,6 +76,7 @@ namespace WebsitePanel.Portal.ExchangeServer
members.Enabled = false;
btnSave.Visible = false;
tabs.IsDefault = true;
}
}
catch (Exception ex)

View file

@ -51,7 +51,6 @@ namespace WebsitePanel.Portal.HostedSolution
{
// get settings
OrganizationSecurityGroup group = ES.Services.Organizations.GetSecurityGroupGeneralSettings(PanelRequest.ItemID, PanelRequest.AccountID);
//OrganizationUser user = ES.Services.Organizations.GetUserGeneralSettings(PanelRequest.ItemID, PanelRequest.AccountID);
litDisplayName.Text = group.DisplayName;

View file

@ -44,6 +44,13 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
set { selectedTab = value; }
}
private bool isDefault = false;
public bool IsDefault
{
get { return isDefault; }
set { isDefault = value; }
}
protected void Page_Load(object sender, EventArgs e)
{
BindTabs();
@ -53,7 +60,10 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
{
List<Tab> tabsList = new List<Tab>();
tabsList.Add(CreateTab("secur_group_settings", "Tab.Settings"));
if (!isDefault)
{
tabsList.Add(CreateTab("secur_group_memberof", "Tab.MemberOf"));
}
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);