Fixed: Cannot get the list of Exchange mailbox plans if logged as user
This commit is contained in:
parent
b148d47bb7
commit
5c9e7bb21c
2 changed files with 19 additions and 2 deletions
|
@ -109,6 +109,15 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
delegate(ServiceProviderItem item) { return (Organization)item; }));
|
delegate(ServiceProviderItem item) { return (Organization)item; }));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static List<Organization> GetExchangeOrganizationsInternal(int packageId, bool recursive)
|
||||||
|
{
|
||||||
|
List<ServiceProviderItem> items = PackageController.GetPackageItemsByTypeInternal(packageId, null, typeof(Organization), recursive);
|
||||||
|
|
||||||
|
return items.ConvertAll<Organization>(
|
||||||
|
new Converter<ServiceProviderItem, Organization>(
|
||||||
|
delegate(ServiceProviderItem item) { return (Organization)item; }));
|
||||||
|
}
|
||||||
|
|
||||||
public static Organization GetOrganization(int itemId)
|
public static Organization GetOrganization(int itemId)
|
||||||
{
|
{
|
||||||
#region Demo Mode
|
#region Demo Mode
|
||||||
|
@ -2554,12 +2563,12 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
if ((Packages != null) & (Packages.Count > 0))
|
if ((Packages != null) & (Packages.Count > 0))
|
||||||
{
|
{
|
||||||
orgs = GetExchangeOrganizations(Packages[0].PackageId, false);
|
orgs = GetExchangeOrganizationsInternal(Packages[0].PackageId, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
orgs = GetExchangeOrganizations(1, false);
|
orgs = GetExchangeOrganizationsInternal(1, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((orgs != null) &(orgs.Count > 0))
|
if ((orgs != null) &(orgs.Count > 0))
|
||||||
|
|
|
@ -1072,6 +1072,14 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
return CreateServiceItemsList(dsItems, 0);
|
return CreateServiceItemsList(dsItems, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static List<ServiceProviderItem> GetPackageItemsByTypeInternal(int packageId, string groupName, Type itemType, bool recursive)
|
||||||
|
{
|
||||||
|
string typeName = ObjectUtils.GetTypeFullName(itemType);
|
||||||
|
DataSet dsItems = DataProvider.GetServiceItems(-1, packageId, groupName, typeName, recursive);
|
||||||
|
|
||||||
|
return CreateServiceItemsList(dsItems, 0);
|
||||||
|
}
|
||||||
|
|
||||||
public static DataSet GetRawPackageItemsByType(int packageId, Type itemType, bool recursive)
|
public static DataSet GetRawPackageItemsByType(int packageId, Type itemType, bool recursive)
|
||||||
{
|
{
|
||||||
return GetRawPackageItemsByType(packageId, null, itemType, recursive);
|
return GetRawPackageItemsByType(packageId, null, itemType, recursive);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue