wsp-10322 little loophole in MSSQL

This commit is contained in:
dev_amdtel 2015-02-19 16:19:40 +04:00
parent ab01ef0469
commit ce4e1afbd3
4 changed files with 56 additions and 3 deletions

View file

@ -125,8 +125,8 @@ namespace WebsitePanel.EnterpriseServer
if (serviceId == 0)
return BusinessErrorCodes.ERROR_MSSQL_RESOURCE_UNAVAILABLE;
// check package items
if (PackageController.GetPackageItemByName(item.PackageId, groupName, item.Name, typeof(SqlDatabase)) != null)
// check service items
if (PackageController.GetServiceItemsCountByNameAndServiceId(serviceId, groupName, item.Name, typeof(SqlDatabase)) > 0)
return BusinessErrorCodes.ERROR_MSSQL_DATABASES_PACKAGE_ITEM_EXISTS;
// place log record