Fixed in Web Engines: check allowed engines (hosting plan quotas) is enabled

This commit is contained in:
Ruslan Keba 2013-10-31 12:40:57 +02:00
parent 4825e8aac8
commit e2283b5358
3 changed files with 51 additions and 6 deletions

View file

@ -76,6 +76,31 @@ namespace WebsitePanel.EnterpriseServer
public static ShortHeliconZooEngine[] GetAllowedHeliconZooQuotasForPackage(int packageId)
{
// first, check IsEnginesAllowed for this server
// get helicon zoo provider serviceId
int heliconZooProviderId, heliconZooGroupId;
DataProvider.GetHeliconZooProviderAndGroup("HeliconZoo", out heliconZooProviderId, out heliconZooGroupId);
// get helicon zoo service id for heliconZooProviderId and packageId
int serviceId = DataProvider.GetServiceIdForProviderIdAndPackageId(heliconZooProviderId, packageId);
if (serviceId > 0)
{
if (IsEnginesEnabled(serviceId))
{
// all engines allowed by default
return new ShortHeliconZooEngine[]
{
new ShortHeliconZooEngine{Name = "*", DisplayName = "*", Enabled = true}
};
}
}
// all engines is not allowed
// get allowed engines from hosting plan quotas
List<ShortHeliconZooEngine> allowedEngines = new List<ShortHeliconZooEngine>();
IDataReader reader = DataProvider.GetEnabledHeliconZooQuotasForPackage(packageId);