merge commit
This commit is contained in:
commit
dd462e4c6a
37 changed files with 8177 additions and 666 deletions
|
@ -85,6 +85,8 @@ namespace WebsitePanel.EnterpriseServer
|
|||
allowedEngines.Add( new ShortHeliconZooEngine(){
|
||||
Name = (string)reader["QuotaName"],
|
||||
DisplayName= (string)reader["QuotaDescription"],
|
||||
Enabled = true
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -120,6 +122,21 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
|
||||
|
||||
public static bool IsWebCosoleEnabled(int serviceId)
|
||||
{
|
||||
HeliconZoo zooServer = new HeliconZoo();
|
||||
ServiceProviderProxy.Init(zooServer, serviceId);
|
||||
return zooServer.IsWebCosoleEnabled();
|
||||
}
|
||||
|
||||
public static void SetWebCosoleEnabled(int serviceId, bool enabled)
|
||||
{
|
||||
HeliconZoo zooServer = new HeliconZoo();
|
||||
ServiceProviderProxy.Init(zooServer, serviceId);
|
||||
zooServer.SetWebCosoleEnabled(enabled);
|
||||
}
|
||||
|
||||
|
||||
#region private helpers
|
||||
private static void UpdateQuotas(int serviceId, HeliconZooEngine[] userEngines)
|
||||
{
|
||||
|
@ -183,7 +200,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
DataProvider.AddHeliconZooQuota(groupId, quotaId,
|
||||
HeliconZooQuotaPrefix+engine.name,
|
||||
engine.displayName,
|
||||
order++);
|
||||
existingQuotas.Count + order++);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2331,7 +2331,15 @@ namespace WebsitePanel.EnterpriseServer
|
|||
// get mailbox settings
|
||||
Organizations orgProxy = GetOrganizationProxy(org.ServiceId);
|
||||
|
||||
OrganizationSecurityGroup securityGroup = orgProxy.GetSecurityGroupGeneralSettings(account.AccountName, org.OrganizationId);
|
||||
//OrganizationSecurityGroup securityGroup = orgProxy.GetSecurityGroupGeneralSettings(account.AccountName, org.OrganizationId);
|
||||
string groupName;
|
||||
string[] parts = account.SamAccountName.Split('\\');
|
||||
if (parts.Length == 2)
|
||||
groupName = parts[1];
|
||||
else
|
||||
groupName = account.SamAccountName;
|
||||
|
||||
OrganizationSecurityGroup securityGroup = orgProxy.GetSecurityGroupGeneralSettings(groupName, org.OrganizationId);
|
||||
|
||||
securityGroup.DisplayName = account.DisplayName;
|
||||
|
||||
|
|
|
@ -493,6 +493,11 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return GetServerService(serverId).GetWPIProductsFiltered(keywordId);
|
||||
}
|
||||
|
||||
public static WPIProduct GetWPIProductById(int serverId, string productdId)
|
||||
{
|
||||
return GetServerService(serverId).GetWPIProductById(productdId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static WPIProduct[] GetWPIProductsWithDependencies(int serverId, string[] products)
|
||||
|
|
|
@ -38,6 +38,7 @@ using System.Xml;
|
|||
using System.Xml.Serialization;
|
||||
|
||||
using WebsitePanel.Providers;
|
||||
using WebsitePanel.Providers.HeliconZoo;
|
||||
using WebsitePanel.Providers.Web;
|
||||
using WebsitePanel.Providers.DNS;
|
||||
using OS = WebsitePanel.Providers.OS;
|
||||
|
@ -470,6 +471,8 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
}
|
||||
|
||||
TryEnableHeliconZooEngines(site.SiteId, site.PackageId);
|
||||
|
||||
TaskManager.ItemId = siteItemId;
|
||||
|
||||
return siteItemId;
|
||||
|
@ -3394,7 +3397,103 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region Helicon Zoo
|
||||
|
||||
public static List<WebVirtualDirectory> GetZooApplications(int siteItemId)
|
||||
{
|
||||
List<WebVirtualDirectory> dirs = new List<WebVirtualDirectory>();
|
||||
|
||||
// load site item
|
||||
WebSite siteItem = (WebSite)PackageController.GetPackageItem(siteItemId);
|
||||
if (siteItem == null)
|
||||
return dirs;
|
||||
|
||||
// truncate home folders
|
||||
WebServer web = new WebServer();
|
||||
ServiceProviderProxy.Init(web, siteItem.ServiceId);
|
||||
WebVirtualDirectory[] vdirs = web.GetZooApplications(siteItem.SiteId);
|
||||
|
||||
foreach (WebVirtualDirectory vdir in vdirs)
|
||||
{
|
||||
vdir.ContentPath = FilesController.GetVirtualPackagePath(siteItem.PackageId, vdir.ContentPath);
|
||||
dirs.Add(vdir);
|
||||
}
|
||||
|
||||
return dirs;
|
||||
}
|
||||
|
||||
public static StringResultObject SetZooEnvironmentVariable(int siteItemId, string appName, string envName, string envValue)
|
||||
{
|
||||
StringResultObject result = new StringResultObject {IsSuccess = false};
|
||||
|
||||
|
||||
// load site item
|
||||
WebSite siteItem = (WebSite)PackageController.GetPackageItem(siteItemId);
|
||||
if (siteItem == null)
|
||||
return result;
|
||||
|
||||
|
||||
WebServer web = new WebServer();
|
||||
ServiceProviderProxy.Init(web, siteItem.ServiceId);
|
||||
return web.SetZooEnvironmentVariable(siteItem.SiteId, appName, envName, envValue);
|
||||
}
|
||||
|
||||
public static StringResultObject SetZooConsoleEnabled(int siteItemId, string appName)
|
||||
{
|
||||
StringResultObject result = new StringResultObject { IsSuccess = false };
|
||||
|
||||
|
||||
// load site item
|
||||
WebSite siteItem = (WebSite)PackageController.GetPackageItem(siteItemId);
|
||||
if (siteItem == null)
|
||||
return result;
|
||||
|
||||
|
||||
WebServer web = new WebServer();
|
||||
ServiceProviderProxy.Init(web, siteItem.ServiceId);
|
||||
return web.SetZooConsoleEnabled(siteItem.SiteId, appName);
|
||||
}
|
||||
|
||||
|
||||
public static StringResultObject SetZooConsoleDisabled(int siteItemId, string appName)
|
||||
{
|
||||
StringResultObject result = new StringResultObject { IsSuccess = false };
|
||||
|
||||
|
||||
// load site item
|
||||
WebSite siteItem = (WebSite)PackageController.GetPackageItem(siteItemId);
|
||||
if (siteItem == null)
|
||||
return result;
|
||||
|
||||
|
||||
WebServer web = new WebServer();
|
||||
ServiceProviderProxy.Init(web, siteItem.ServiceId);
|
||||
return web.SetZooConsoleDisabled(siteItem.SiteId, appName);
|
||||
}
|
||||
|
||||
public static void TryEnableHeliconZooEngines(string siteId, int packageId)
|
||||
{
|
||||
try
|
||||
{
|
||||
ShortHeliconZooEngine[] allowedEngines = HeliconZooController.GetAllowedHeliconZooQuotasForPackage(packageId);
|
||||
string[] engineNames = new string[allowedEngines.Length];
|
||||
int i = 0;
|
||||
foreach (ShortHeliconZooEngine engine in allowedEngines)
|
||||
{
|
||||
engineNames[i] = engine.Name.Replace(HeliconZooController.HeliconZooQuotaPrefix, "");
|
||||
i++;
|
||||
}
|
||||
HeliconZooController.SetEnabledEnginesForSite(siteId, packageId, engineNames);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
TaskManager.WriteWarning("Error on enabling zoo engines for site '{0}': {1}", siteId, e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region WebManagement Access
|
||||
|
||||
public static ResultObject GrantWebManagementAccess(int siteItemId, string accountName, string accountPassword)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue