fixed bugs
This commit is contained in:
parent
f11d00d4fa
commit
34af4912e8
5 changed files with 28 additions and 5 deletions
|
@ -46,7 +46,12 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
|
|
||||||
public static string[] GetGroupObjects(string group, string objectType)
|
public static string[] GetGroupObjects(string group, string objectType)
|
||||||
{
|
{
|
||||||
List<string> rets = new List<string>();
|
return GetGroupObjects(group, objectType, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string[] GetGroupObjects(string group, string objectType, DirectoryEntry entry)
|
||||||
|
{
|
||||||
|
List<string> rets = new List<string>();
|
||||||
|
|
||||||
DirectorySearcher deSearch = new DirectorySearcher
|
DirectorySearcher deSearch = new DirectorySearcher
|
||||||
{
|
{
|
||||||
|
@ -54,6 +59,11 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
"(&(objectClass=" + objectType + "))"
|
"(&(objectClass=" + objectType + "))"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (entry != null)
|
||||||
|
{
|
||||||
|
deSearch.SearchRoot = entry;
|
||||||
|
}
|
||||||
|
|
||||||
SearchResultCollection srcObjects = deSearch.FindAll();
|
SearchResultCollection srcObjects = deSearch.FindAll();
|
||||||
|
|
||||||
foreach (SearchResult srcObject in srcObjects)
|
foreach (SearchResult srcObject in srcObjects)
|
||||||
|
|
|
@ -918,8 +918,11 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
throw new ArgumentNullException("groupName");
|
throw new ArgumentNullException("groupName");
|
||||||
|
|
||||||
string path = GetGroupPath(organizationId, groupName);
|
string path = GetGroupPath(organizationId, groupName);
|
||||||
|
string organizationPath = GetOrganizationPath(organizationId);
|
||||||
|
|
||||||
DirectoryEntry entry = ActiveDirectoryUtils.GetADObject(path);
|
DirectoryEntry entry = ActiveDirectoryUtils.GetADObject(path);
|
||||||
|
DirectoryEntry organizationEntry = ActiveDirectoryUtils.GetADObject(organizationPath);
|
||||||
|
|
||||||
|
|
||||||
OrganizationSecurityGroup securityGroup = new OrganizationSecurityGroup();
|
OrganizationSecurityGroup securityGroup = new OrganizationSecurityGroup();
|
||||||
|
|
||||||
|
@ -930,7 +933,7 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
|
|
||||||
List<ExchangeAccount> members = new List<ExchangeAccount>();
|
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);
|
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);
|
DirectoryEntry groupEntry = ActiveDirectoryUtils.GetADObject(groupPath);
|
||||||
|
|
||||||
|
|
|
@ -76,6 +76,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
||||||
members.Enabled = false;
|
members.Enabled = false;
|
||||||
|
|
||||||
btnSave.Visible = false;
|
btnSave.Visible = false;
|
||||||
|
tabs.IsDefault = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
|
@ -51,7 +51,6 @@ namespace WebsitePanel.Portal.HostedSolution
|
||||||
{
|
{
|
||||||
// get settings
|
// get settings
|
||||||
OrganizationSecurityGroup group = ES.Services.Organizations.GetSecurityGroupGeneralSettings(PanelRequest.ItemID, PanelRequest.AccountID);
|
OrganizationSecurityGroup group = ES.Services.Organizations.GetSecurityGroupGeneralSettings(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||||
//OrganizationUser user = ES.Services.Organizations.GetUserGeneralSettings(PanelRequest.ItemID, PanelRequest.AccountID);
|
|
||||||
|
|
||||||
litDisplayName.Text = group.DisplayName;
|
litDisplayName.Text = group.DisplayName;
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,13 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
||||||
set { selectedTab = value; }
|
set { selectedTab = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool isDefault = false;
|
||||||
|
public bool IsDefault
|
||||||
|
{
|
||||||
|
get { return isDefault; }
|
||||||
|
set { isDefault = value; }
|
||||||
|
}
|
||||||
|
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
BindTabs();
|
BindTabs();
|
||||||
|
@ -53,7 +60,10 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
||||||
{
|
{
|
||||||
List<Tab> tabsList = new List<Tab>();
|
List<Tab> tabsList = new List<Tab>();
|
||||||
tabsList.Add(CreateTab("secur_group_settings", "Tab.Settings"));
|
tabsList.Add(CreateTab("secur_group_settings", "Tab.Settings"));
|
||||||
tabsList.Add(CreateTab("secur_group_memberof", "Tab.MemberOf"));
|
if (!isDefault)
|
||||||
|
{
|
||||||
|
tabsList.Add(CreateTab("secur_group_memberof", "Tab.MemberOf"));
|
||||||
|
}
|
||||||
|
|
||||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue