mergec ommit
This commit is contained in:
commit
93c2760d4a
17 changed files with 464 additions and 81 deletions
|
@ -42,6 +42,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
public const string BACKUP_SETTINGS = "BackupSettings";
|
public const string BACKUP_SETTINGS = "BackupSettings";
|
||||||
public const string SETUP_SETTINGS = "SetupSettings";
|
public const string SETUP_SETTINGS = "SetupSettings";
|
||||||
public const string WPI_SETTINGS = "WpiSettings";
|
public const string WPI_SETTINGS = "WpiSettings";
|
||||||
|
public const string FILEMANAGER_SETTINGS = "FileManagerSettings";
|
||||||
|
|
||||||
// key to access to wpi main & custom feed in wpi settings
|
// key to access to wpi main & custom feed in wpi settings
|
||||||
public const string WPI_MAIN_FEED_KEY = "WpiMainFeedUrl";
|
public const string WPI_MAIN_FEED_KEY = "WpiMainFeedUrl";
|
||||||
|
|
|
@ -58,7 +58,9 @@ namespace WebsitePanel.EnterpriseServer {
|
||||||
[System.Web.Services.WebServiceBindingAttribute(Name="esFilesSoap", Namespace="http://smbsaas/websitepanel/enterpriseserver")]
|
[System.Web.Services.WebServiceBindingAttribute(Name="esFilesSoap", Namespace="http://smbsaas/websitepanel/enterpriseserver")]
|
||||||
[System.Xml.Serialization.XmlIncludeAttribute(typeof(ServiceProviderItem))]
|
[System.Xml.Serialization.XmlIncludeAttribute(typeof(ServiceProviderItem))]
|
||||||
public partial class esFiles : Microsoft.Web.Services3.WebServicesClientProtocol {
|
public partial class esFiles : Microsoft.Web.Services3.WebServicesClientProtocol {
|
||||||
|
|
||||||
|
private System.Threading.SendOrPostCallback GetFileManagerSettingsOperationCompleted;
|
||||||
|
|
||||||
private System.Threading.SendOrPostCallback GetFilesOperationCompleted;
|
private System.Threading.SendOrPostCallback GetFilesOperationCompleted;
|
||||||
|
|
||||||
private System.Threading.SendOrPostCallback GetFilesByMaskOperationCompleted;
|
private System.Threading.SendOrPostCallback GetFilesByMaskOperationCompleted;
|
||||||
|
@ -110,6 +112,9 @@ namespace WebsitePanel.EnterpriseServer {
|
||||||
this.Url = "http://localhost/EnterpriseServer/esFiles.asmx";
|
this.Url = "http://localhost/EnterpriseServer/esFiles.asmx";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public event GetFileManagerSettingsCompletedEventHandler GetFileManagerSettingsCompleted;
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public event GetFilesCompletedEventHandler GetFilesCompleted;
|
public event GetFilesCompletedEventHandler GetFilesCompleted;
|
||||||
|
|
||||||
|
@ -178,6 +183,52 @@ namespace WebsitePanel.EnterpriseServer {
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
public event ExecuteSyncActionsCompletedEventHandler ExecuteSyncActionsCompleted;
|
public event ExecuteSyncActionsCompletedEventHandler ExecuteSyncActionsCompleted;
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetFileManagerSettings", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||||
|
public SystemSettings GetFileManagerSettings()
|
||||||
|
{
|
||||||
|
object[] results = this.Invoke("GetFileManagerSettings", new Object[] {});
|
||||||
|
return ((SystemSettings)(results[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public System.IAsyncResult BeginGetFileManagerSettings(System.AsyncCallback callback, object asyncState)
|
||||||
|
{
|
||||||
|
return this.BeginInvoke("GetFileManagerSettings", new Object[] {}, callback, asyncState);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public SystemSettings EndGetFileManagerSettings(System.IAsyncResult asyncResult)
|
||||||
|
{
|
||||||
|
object[] results = this.EndInvoke(asyncResult);
|
||||||
|
return ((SystemSettings)(results[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void GetFileManagerSettingsAsync()
|
||||||
|
{
|
||||||
|
this.GetFileManagerSettingsAsync(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public void GetFileManagerSettingsAsync(object userState)
|
||||||
|
{
|
||||||
|
if ((this.GetFileManagerSettingsOperationCompleted == null))
|
||||||
|
{
|
||||||
|
this.GetFileManagerSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetFileManagerSettingsOperationCompleted);
|
||||||
|
}
|
||||||
|
this.InvokeAsync("GetFileManagerSettings", new Object[] {}, this.GetFileManagerSettingsOperationCompleted, userState);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnGetFileManagerSettingsOperationCompleted(object arg)
|
||||||
|
{
|
||||||
|
if ((this.GetFileManagerSettingsCompleted != null))
|
||||||
|
{
|
||||||
|
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||||
|
this.GetFileManagerSettingsCompleted(this, new GetFileManagerSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetFiles", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetFiles", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||||
|
@ -1260,7 +1311,33 @@ namespace WebsitePanel.EnterpriseServer {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public delegate void GetFileManagerSettingsCompletedEventHandler(object sender, GetFileManagerSettingsCompletedEventArgs e);
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
|
||||||
|
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||||
|
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||||
|
public partial class GetFileManagerSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
|
||||||
|
{
|
||||||
|
|
||||||
|
private object[] results;
|
||||||
|
|
||||||
|
internal GetFileManagerSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||||
|
base(exception, cancelled, userState)
|
||||||
|
{
|
||||||
|
this.results = results;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks/>
|
||||||
|
public SystemSettings Result
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
this.RaiseExceptionIfNecessary();
|
||||||
|
return ((SystemSettings)(this.results[0]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <remarks/>
|
/// <remarks/>
|
||||||
|
|
|
@ -45,6 +45,11 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
{
|
{
|
||||||
public class FilesController
|
public class FilesController
|
||||||
{
|
{
|
||||||
|
public static SystemSettings GetFileManagerSettings()
|
||||||
|
{
|
||||||
|
return SystemController.GetSystemSettingsInternal(SystemSettings.FILEMANAGER_SETTINGS, false);
|
||||||
|
}
|
||||||
|
|
||||||
public static OS.OperatingSystem GetOS(int packageId)
|
public static OS.OperatingSystem GetOS(int packageId)
|
||||||
{
|
{
|
||||||
int sid = PackageController.GetPackageServiceId(packageId, ResourceGroups.Os);
|
int sid = PackageController.GetPackageServiceId(packageId, ResourceGroups.Os);
|
||||||
|
|
|
@ -2341,7 +2341,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
|
|
||||||
foreach (ExchangeAccount user in securityGroup.MembersAccounts)
|
foreach (ExchangeAccount user in securityGroup.MembersAccounts)
|
||||||
{
|
{
|
||||||
OrganizationUser userAccount = GetAccountByAccountName(itemId, user.SamAccountName);
|
OrganizationUser userAccount = GetAccountByAccountName(itemId, user.AccountName);
|
||||||
|
|
||||||
if (userAccount != null)
|
if (userAccount != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -50,6 +50,12 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
[ToolboxItem(false)]
|
[ToolboxItem(false)]
|
||||||
public class esFiles : System.Web.Services.WebService
|
public class esFiles : System.Web.Services.WebService
|
||||||
{
|
{
|
||||||
|
[WebMethod]
|
||||||
|
public SystemSettings GetFileManagerSettings()
|
||||||
|
{
|
||||||
|
return FilesController.GetFileManagerSettings();
|
||||||
|
}
|
||||||
|
|
||||||
[WebMethod]
|
[WebMethod]
|
||||||
public static string GetHomeFolder(int packageId)
|
public static string GetHomeFolder(int packageId)
|
||||||
{
|
{
|
||||||
|
|
|
@ -255,6 +255,18 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
return ret != null ? ret.ToString() : string.Empty;
|
return ret != null ? ret.ToString() : string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static string GetCNFromADPath(string path)
|
||||||
|
{
|
||||||
|
string[] parts = path.Substring(path.ToUpper().IndexOf("CN=")).Split(',');
|
||||||
|
|
||||||
|
if (parts.Length > 0)
|
||||||
|
{
|
||||||
|
return parts[0].Substring(3);
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
public static string ConvertADPathToCanonicalName(string name)
|
public static string ConvertADPathToCanonicalName(string name)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -928,8 +928,10 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
|
|
||||||
securityGroup.Notes = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.Notes);
|
securityGroup.Notes = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.Notes);
|
||||||
|
|
||||||
securityGroup.AccountName = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.SAMAccountName);
|
string samAccountName = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.SAMAccountName);
|
||||||
securityGroup.SAMAccountName = ActiveDirectoryUtils.GetADObjectStringProperty(entry, ADAttributes.SAMAccountName);
|
|
||||||
|
securityGroup.AccountName = samAccountName;
|
||||||
|
securityGroup.SAMAccountName = samAccountName;
|
||||||
|
|
||||||
List<ExchangeAccount> members = new List<ExchangeAccount>();
|
List<ExchangeAccount> members = new List<ExchangeAccount>();
|
||||||
|
|
||||||
|
@ -939,7 +941,7 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
|
|
||||||
members.Add(new ExchangeAccount
|
members.Add(new ExchangeAccount
|
||||||
{
|
{
|
||||||
AccountName = tmpUser.AccountName,
|
AccountName = ActiveDirectoryUtils.GetCNFromADPath(userPath),
|
||||||
SamAccountName = tmpUser.SamAccountName
|
SamAccountName = tmpUser.SamAccountName
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -948,10 +950,12 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
{
|
{
|
||||||
DirectoryEntry groupEntry = ActiveDirectoryUtils.GetADObject(groupPath);
|
DirectoryEntry groupEntry = ActiveDirectoryUtils.GetADObject(groupPath);
|
||||||
|
|
||||||
|
string tmpSamAccountName = ActiveDirectoryUtils.GetADObjectStringProperty(groupEntry, ADAttributes.SAMAccountName);
|
||||||
|
|
||||||
members.Add(new ExchangeAccount
|
members.Add(new ExchangeAccount
|
||||||
{
|
{
|
||||||
AccountName = ActiveDirectoryUtils.GetADObjectStringProperty(groupEntry, ADAttributes.SAMAccountName),
|
AccountName = tmpSamAccountName,
|
||||||
SamAccountName = ActiveDirectoryUtils.GetADObjectStringProperty(groupEntry, ADAttributes.SAMAccountName)
|
SamAccountName = tmpSamAccountName
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -112,10 +112,10 @@
|
||||||
<value>2.0</value>
|
<value>2.0</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<resheader name="reader">
|
<resheader name="reader">
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<data name="btnSaveSettings.Text" xml:space="preserve">
|
<data name="btnSaveSettings.Text" xml:space="preserve">
|
||||||
<value>Save Settings</value>
|
<value>Save Settings</value>
|
||||||
|
@ -153,4 +153,13 @@
|
||||||
<data name="lclWpiCustomFeeds.Text" xml:space="preserve">
|
<data name="lclWpiCustomFeeds.Text" xml:space="preserve">
|
||||||
<value>Custom feeds:</value>
|
<value>Custom feeds:</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="HeaderFileManagerSettings.Text" xml:space="preserve">
|
||||||
|
<value>File Manager</value>
|
||||||
|
</data>
|
||||||
|
<data name="lblFileManagerEditableExtensions.Text" xml:space="preserve">
|
||||||
|
<value>Editable Extensions:</value>
|
||||||
|
</data>
|
||||||
|
<data name="litFileManagerEditableExtensions.Text" xml:space="preserve">
|
||||||
|
<value>(One (1) extension per line)</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -45,14 +45,37 @@ namespace WebsitePanel.Portal.ExchangeServer
|
||||||
{
|
{
|
||||||
public partial class ExchangeDistributionListMemberOf : WebsitePanelModuleBase
|
public partial class ExchangeDistributionListMemberOf : WebsitePanelModuleBase
|
||||||
{
|
{
|
||||||
|
protected PackageContext cntx;
|
||||||
|
|
||||||
|
protected PackageContext Cntx
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (cntx == null)
|
||||||
|
{
|
||||||
|
cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||||
|
}
|
||||||
|
|
||||||
|
return cntx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected bool EnableSecurityGroups
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Utils.CheckQouta(Quotas.ORGANIZATION_SECURITYGROUPMANAGEMENT, Cntx);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
groups.SecurityGroupsEnabled = EnableSecurityGroups;
|
||||||
|
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
BindSettings();
|
BindSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BindSettings()
|
private void BindSettings()
|
||||||
|
@ -67,17 +90,20 @@ namespace WebsitePanel.Portal.ExchangeServer
|
||||||
|
|
||||||
ExchangeAccount[] dLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
ExchangeAccount[] dLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||||
|
|
||||||
ExchangeAccount[] secGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
|
||||||
|
|
||||||
List<ExchangeAccount> groupsList = new List<ExchangeAccount>();
|
List<ExchangeAccount> groupsList = new List<ExchangeAccount>();
|
||||||
foreach (ExchangeAccount distList in dLists)
|
foreach (ExchangeAccount distList in dLists)
|
||||||
{
|
{
|
||||||
groupsList.Add(distList);
|
groupsList.Add(distList);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (ExchangeAccount secGroup in secGroups)
|
if (EnableSecurityGroups)
|
||||||
{
|
{
|
||||||
groupsList.Add(secGroup);
|
ExchangeAccount[] secGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||||
|
|
||||||
|
foreach (ExchangeAccount secGroup in secGroups)
|
||||||
|
{
|
||||||
|
groupsList.Add(secGroup);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
groups.SetAccounts(groupsList.ToArray());
|
groups.SetAccounts(groupsList.ToArray());
|
||||||
|
@ -96,18 +122,24 @@ namespace WebsitePanel.Portal.ExchangeServer
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ExchangeAccount[] oldSecGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
|
||||||
ExchangeAccount[] oldDistLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
|
||||||
|
|
||||||
IList<ExchangeAccount> oldGroups = new List<ExchangeAccount>();
|
IList<ExchangeAccount> oldGroups = new List<ExchangeAccount>();
|
||||||
foreach (ExchangeAccount distList in oldSecGroups)
|
|
||||||
|
if (EnableSecurityGroups)
|
||||||
{
|
{
|
||||||
oldGroups.Add(distList);
|
ExchangeAccount[] oldSecGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||||
|
|
||||||
|
|
||||||
|
foreach (ExchangeAccount secGroup in oldSecGroups)
|
||||||
|
{
|
||||||
|
oldGroups.Add(secGroup);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (ExchangeAccount secGroup in oldDistLists)
|
ExchangeAccount[] oldDistLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||||
|
|
||||||
|
foreach (ExchangeAccount distList in oldDistLists)
|
||||||
{
|
{
|
||||||
oldGroups.Add(secGroup);
|
oldGroups.Add(distList);
|
||||||
}
|
}
|
||||||
|
|
||||||
IDictionary<string, ExchangeAccountType> newGroups = groups.GetFullAccounts();
|
IDictionary<string, ExchangeAccountType> newGroups = groups.GetFullAccounts();
|
||||||
|
|
|
@ -35,8 +35,33 @@ namespace WebsitePanel.Portal.ExchangeServer
|
||||||
{
|
{
|
||||||
public partial class ExchangeMailboxMemberOf : WebsitePanelModuleBase
|
public partial class ExchangeMailboxMemberOf : WebsitePanelModuleBase
|
||||||
{
|
{
|
||||||
|
protected PackageContext cntx;
|
||||||
|
|
||||||
|
protected PackageContext Cntx
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (cntx == null)
|
||||||
|
{
|
||||||
|
cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||||
|
}
|
||||||
|
|
||||||
|
return cntx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected bool EnableSecurityGroups
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Utils.CheckQouta(Quotas.ORGANIZATION_SECURITYGROUPMANAGEMENT, Cntx);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
groups.SecurityGroupsEnabled = EnableSecurityGroups;
|
||||||
|
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||||
|
@ -44,9 +69,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
||||||
BindSettings();
|
BindSettings();
|
||||||
|
|
||||||
UserInfo user = UsersHelper.GetUser(PanelSecurity.EffectiveUserId);
|
UserInfo user = UsersHelper.GetUser(PanelSecurity.EffectiveUserId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BindSettings()
|
private void BindSettings()
|
||||||
|
@ -59,21 +82,25 @@ namespace WebsitePanel.Portal.ExchangeServer
|
||||||
|
|
||||||
// title
|
// title
|
||||||
litDisplayName.Text = mailbox.DisplayName;
|
litDisplayName.Text = mailbox.DisplayName;
|
||||||
//Distribution Lists
|
|
||||||
ExchangeAccount[] dLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
|
||||||
|
|
||||||
//Security Groups
|
|
||||||
ExchangeAccount[] securGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
|
||||||
|
|
||||||
List<ExchangeAccount> groupsList = new List<ExchangeAccount>();
|
List<ExchangeAccount> groupsList = new List<ExchangeAccount>();
|
||||||
|
|
||||||
|
//Distribution Lists
|
||||||
|
ExchangeAccount[] dLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||||
foreach (ExchangeAccount distList in dLists)
|
foreach (ExchangeAccount distList in dLists)
|
||||||
{
|
{
|
||||||
groupsList.Add(distList);
|
groupsList.Add(distList);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (ExchangeAccount secGroup in securGroups)
|
if (EnableSecurityGroups)
|
||||||
{
|
{
|
||||||
groupsList.Add(secGroup);
|
//Security Groups
|
||||||
|
ExchangeAccount[] securGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||||
|
|
||||||
|
foreach (ExchangeAccount secGroup in securGroups)
|
||||||
|
{
|
||||||
|
groupsList.Add(secGroup);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
groups.SetAccounts(groupsList.ToArray());
|
groups.SetAccounts(groupsList.ToArray());
|
||||||
|
@ -92,18 +119,23 @@ namespace WebsitePanel.Portal.ExchangeServer
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ExchangeAccount[] oldSecGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
|
||||||
ExchangeAccount[] oldDistLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
|
||||||
|
|
||||||
IList<ExchangeAccount> oldGroups = new List<ExchangeAccount>();
|
IList<ExchangeAccount> oldGroups = new List<ExchangeAccount>();
|
||||||
foreach (ExchangeAccount distList in oldSecGroups)
|
|
||||||
|
if (EnableSecurityGroups)
|
||||||
{
|
{
|
||||||
oldGroups.Add(distList);
|
ExchangeAccount[] oldSecGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||||
|
|
||||||
|
foreach (ExchangeAccount secGroup in oldSecGroups)
|
||||||
|
{
|
||||||
|
oldGroups.Add(secGroup);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (ExchangeAccount secGroup in oldDistLists)
|
ExchangeAccount[] oldDistLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||||
|
|
||||||
|
foreach (ExchangeAccount distList in oldDistLists)
|
||||||
{
|
{
|
||||||
oldGroups.Add(secGroup);
|
oldGroups.Add(distList);
|
||||||
}
|
}
|
||||||
|
|
||||||
IDictionary<string, ExchangeAccountType> newGroups = groups.GetFullAccounts();
|
IDictionary<string, ExchangeAccountType> newGroups = groups.GetFullAccounts();
|
||||||
|
|
|
@ -37,8 +37,41 @@ namespace WebsitePanel.Portal.HostedSolution
|
||||||
{
|
{
|
||||||
public partial class OrganizationSecurityGroupMemberOf : WebsitePanelModuleBase
|
public partial class OrganizationSecurityGroupMemberOf : WebsitePanelModuleBase
|
||||||
{
|
{
|
||||||
|
protected PackageContext cntx;
|
||||||
|
|
||||||
|
protected PackageContext Cntx
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (cntx == null)
|
||||||
|
{
|
||||||
|
cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||||
|
}
|
||||||
|
|
||||||
|
return cntx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected bool EnableDistributionLists
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Cntx.Groups.ContainsKey(ResourceGroups.Exchange) & Utils.CheckQouta(Quotas.EXCHANGE2007_DISTRIBUTIONLISTS, Cntx);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected bool EnableSecurityGroups
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Utils.CheckQouta(Quotas.ORGANIZATION_SECURITYGROUPMANAGEMENT, Cntx);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
groups.DistributionListsEnabled = EnableDistributionLists;
|
||||||
|
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
BindSettings();
|
BindSettings();
|
||||||
|
@ -53,22 +86,29 @@ namespace WebsitePanel.Portal.HostedSolution
|
||||||
OrganizationSecurityGroup group = ES.Services.Organizations.GetSecurityGroupGeneralSettings(PanelRequest.ItemID, PanelRequest.AccountID);
|
OrganizationSecurityGroup group = ES.Services.Organizations.GetSecurityGroupGeneralSettings(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||||
|
|
||||||
litDisplayName.Text = group.DisplayName;
|
litDisplayName.Text = group.DisplayName;
|
||||||
|
|
||||||
//Distribution Lists
|
|
||||||
ExchangeAccount[] dLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
|
||||||
|
|
||||||
//Security Groups
|
|
||||||
ExchangeAccount[] securGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
|
||||||
|
|
||||||
List<ExchangeAccount> groupsList = new List<ExchangeAccount>();
|
List<ExchangeAccount> groupsList = new List<ExchangeAccount>();
|
||||||
foreach (ExchangeAccount distList in dLists)
|
|
||||||
|
if (EnableDistributionLists)
|
||||||
{
|
{
|
||||||
groupsList.Add(distList);
|
//Distribution Lists
|
||||||
|
ExchangeAccount[] dLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||||
|
|
||||||
|
foreach (ExchangeAccount distList in dLists)
|
||||||
|
{
|
||||||
|
groupsList.Add(distList);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (ExchangeAccount secGroup in securGroups)
|
if (EnableSecurityGroups)
|
||||||
{
|
{
|
||||||
groupsList.Add(secGroup);
|
//Security Groups
|
||||||
|
ExchangeAccount[] securGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||||
|
|
||||||
|
foreach (ExchangeAccount secGroup in securGroups)
|
||||||
|
{
|
||||||
|
groupsList.Add(secGroup);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
groups.SetAccounts(groupsList.ToArray());
|
groups.SetAccounts(groupsList.ToArray());
|
||||||
|
@ -87,21 +127,30 @@ namespace WebsitePanel.Portal.HostedSolution
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ExchangeAccount[] oldSecGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
|
||||||
ExchangeAccount[] oldDistLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
|
||||||
|
|
||||||
IList<ExchangeAccount> oldGroups = new List<ExchangeAccount>();
|
IList<ExchangeAccount> oldGroups = new List<ExchangeAccount>();
|
||||||
foreach (ExchangeAccount distList in oldSecGroups)
|
|
||||||
|
if (EnableDistributionLists)
|
||||||
{
|
{
|
||||||
oldGroups.Add(distList);
|
ExchangeAccount[] oldDistLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||||
|
|
||||||
|
foreach (ExchangeAccount distList in oldDistLists)
|
||||||
|
{
|
||||||
|
oldGroups.Add(distList);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (ExchangeAccount secGroup in oldDistLists)
|
if (EnableSecurityGroups)
|
||||||
{
|
{
|
||||||
oldGroups.Add(secGroup);
|
ExchangeAccount[] oldSecGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||||
|
|
||||||
|
foreach (ExchangeAccount secGroup in oldSecGroups)
|
||||||
|
{
|
||||||
|
oldGroups.Add(secGroup);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IDictionary<string, ExchangeAccountType> newGroups = groups.GetFullAccounts();
|
IDictionary<string, ExchangeAccountType> newGroups = groups.GetFullAccounts();
|
||||||
|
|
||||||
foreach (ExchangeAccount oldGroup in oldGroups)
|
foreach (ExchangeAccount oldGroup in oldGroups)
|
||||||
{
|
{
|
||||||
if (newGroups.ContainsKey(oldGroup.AccountName))
|
if (newGroups.ContainsKey(oldGroup.AccountName))
|
||||||
|
|
|
@ -37,8 +37,42 @@ namespace WebsitePanel.Portal.HostedSolution
|
||||||
{
|
{
|
||||||
public partial class UserMemberOf : WebsitePanelModuleBase
|
public partial class UserMemberOf : WebsitePanelModuleBase
|
||||||
{
|
{
|
||||||
|
protected PackageContext cntx;
|
||||||
|
|
||||||
|
protected PackageContext Cntx
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (cntx == null)
|
||||||
|
{
|
||||||
|
cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||||
|
}
|
||||||
|
|
||||||
|
return cntx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected bool EnableDistributionLists
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Cntx.Groups.ContainsKey(ResourceGroups.Exchange) & Utils.CheckQouta(Quotas.EXCHANGE2007_DISTRIBUTIONLISTS, Cntx);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected bool EnableSecurityGroups
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Utils.CheckQouta(Quotas.ORGANIZATION_SECURITYGROUPMANAGEMENT, Cntx);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
groups.DistributionListsEnabled = EnableDistributionLists;
|
||||||
|
groups.SecurityGroupsEnabled = EnableSecurityGroups;
|
||||||
|
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
BindSettings();
|
BindSettings();
|
||||||
|
@ -61,22 +95,29 @@ namespace WebsitePanel.Portal.HostedSolution
|
||||||
|| user.AccountType == ExchangeAccountType.Equipment);
|
|| user.AccountType == ExchangeAccountType.Equipment);
|
||||||
|
|
||||||
litDisplayName.Text = user.DisplayName;
|
litDisplayName.Text = user.DisplayName;
|
||||||
|
|
||||||
//Distribution Lists
|
|
||||||
ExchangeAccount[] dLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
|
||||||
|
|
||||||
//Security Groups
|
|
||||||
ExchangeAccount[] securGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
|
||||||
|
|
||||||
List<ExchangeAccount> groupsList = new List<ExchangeAccount>();
|
List<ExchangeAccount> groupsList = new List<ExchangeAccount>();
|
||||||
foreach (ExchangeAccount distList in dLists)
|
|
||||||
|
if (EnableDistributionLists)
|
||||||
{
|
{
|
||||||
groupsList.Add(distList);
|
//Distribution Lists
|
||||||
|
ExchangeAccount[] dLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||||
|
|
||||||
|
foreach (ExchangeAccount distList in dLists)
|
||||||
|
{
|
||||||
|
groupsList.Add(distList);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (ExchangeAccount secGroup in securGroups)
|
if (EnableSecurityGroups)
|
||||||
{
|
{
|
||||||
groupsList.Add(secGroup);
|
//Security Groups
|
||||||
|
ExchangeAccount[] securGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||||
|
|
||||||
|
foreach (ExchangeAccount secGroup in securGroups)
|
||||||
|
{
|
||||||
|
groupsList.Add(secGroup);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
groups.SetAccounts(groupsList.ToArray());
|
groups.SetAccounts(groupsList.ToArray());
|
||||||
|
@ -95,21 +136,30 @@ namespace WebsitePanel.Portal.HostedSolution
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ExchangeAccount[] oldSecGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
|
||||||
ExchangeAccount[] oldDistLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
|
||||||
|
|
||||||
IList<ExchangeAccount> oldGroups = new List<ExchangeAccount>();
|
IList<ExchangeAccount> oldGroups = new List<ExchangeAccount>();
|
||||||
foreach (ExchangeAccount distList in oldSecGroups)
|
|
||||||
|
if (EnableDistributionLists)
|
||||||
{
|
{
|
||||||
oldGroups.Add(distList);
|
ExchangeAccount[] oldDistLists = ES.Services.ExchangeServer.GetDistributionListsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||||
|
|
||||||
|
foreach (ExchangeAccount distList in oldDistLists)
|
||||||
|
{
|
||||||
|
oldGroups.Add(distList);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (ExchangeAccount secGroup in oldDistLists)
|
if (EnableSecurityGroups)
|
||||||
{
|
{
|
||||||
oldGroups.Add(secGroup);
|
ExchangeAccount[] oldSecGroups = ES.Services.Organizations.GetSecurityGroupsByMember(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||||
|
|
||||||
|
foreach (ExchangeAccount secGroup in oldSecGroups)
|
||||||
|
{
|
||||||
|
oldGroups.Add(secGroup);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IDictionary<string, ExchangeAccountType> newGroups = groups.GetFullAccounts();
|
IDictionary<string, ExchangeAccountType> newGroups = groups.GetFullAccounts();
|
||||||
|
|
||||||
foreach (ExchangeAccount oldGroup in oldGroups)
|
foreach (ExchangeAccount oldGroup in oldGroups)
|
||||||
{
|
{
|
||||||
if (newGroups.ContainsKey(oldGroup.AccountName))
|
if (newGroups.ContainsKey(oldGroup.AccountName))
|
||||||
|
@ -145,7 +195,6 @@ namespace WebsitePanel.Portal.HostedSolution
|
||||||
|
|
||||||
messageBox.ShowSuccessMessage("ORGANIZATION_UPDATE_USER_SETTINGS");
|
messageBox.ShowSuccessMessage("ORGANIZATION_UPDATE_USER_SETTINGS");
|
||||||
|
|
||||||
|
|
||||||
BindSettings();
|
BindSettings();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
|
@ -31,6 +31,7 @@ using System.Collections.Generic;
|
||||||
using WebsitePanel.Portal.Code.UserControls;
|
using WebsitePanel.Portal.Code.UserControls;
|
||||||
using WebsitePanel.WebPortal;
|
using WebsitePanel.WebPortal;
|
||||||
using WebsitePanel.EnterpriseServer;
|
using WebsitePanel.EnterpriseServer;
|
||||||
|
using WebsitePanel.Providers.HostedSolution;
|
||||||
|
|
||||||
namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
||||||
{
|
{
|
||||||
|
@ -59,8 +60,23 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
||||||
|
|
||||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||||
|
|
||||||
if (Utils.CheckQouta(Quotas.ORGANIZATION_SECURITYGROUPMANAGEMENT, cntx) || Utils.CheckQouta(Quotas.EXCHANGE2007_DISTRIBUTIONLISTS, cntx))
|
bool bSuccess = Utils.CheckQouta(Quotas.ORGANIZATION_SECURITYGROUPMANAGEMENT, cntx);
|
||||||
|
|
||||||
|
if (!bSuccess)
|
||||||
|
{
|
||||||
|
// get user settings
|
||||||
|
OrganizationUser user = ES.Services.Organizations.GetUserGeneralSettings(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||||
|
|
||||||
|
bSuccess = (Utils.CheckQouta(Quotas.EXCHANGE2007_DISTRIBUTIONLISTS, cntx)
|
||||||
|
&& (user.AccountType == ExchangeAccountType.Mailbox
|
||||||
|
|| user.AccountType == ExchangeAccountType.Room
|
||||||
|
|| user.AccountType == ExchangeAccountType.Equipment));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bSuccess)
|
||||||
|
{
|
||||||
tabsList.Add(CreateTab("user_memberof", "Tab.MemberOf"));
|
tabsList.Add(CreateTab("user_memberof", "Tab.MemberOf"));
|
||||||
|
}
|
||||||
|
|
||||||
// find selected menu item
|
// find selected menu item
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
|
|
|
@ -33,12 +33,14 @@ using System.Text;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Web.UI.WebControls;
|
using System.Web.UI.WebControls;
|
||||||
using WebsitePanel.Providers.OS;
|
using WebsitePanel.Providers.OS;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
namespace WebsitePanel.Portal
|
namespace WebsitePanel.Portal
|
||||||
{
|
{
|
||||||
public partial class FileManager : WebsitePanelModuleBase
|
public partial class FileManager : WebsitePanelModuleBase
|
||||||
{
|
{
|
||||||
string ALLOWED_EDIT_EXTENSIONS = ".txt.htm.html.php.pl.sql.cs.vb.ascx.aspx.inc.asp.config.xml.xsl.xslt.xsd.Master.htaccess.htpasswd.cshtml.vbhtml";
|
public static string ALLOWED_EDIT_EXTENSIONS = ".txt,.htm,.html,.php,.pl,.sql,.cs,.vb,.ascx,.aspx,.inc,.asp,.config,.xml,.xsl,.xslt,.xsd,.master,.htaccess,.htpasswd,.cshtml,.vbhtml,.ini,.config";
|
||||||
|
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
@ -204,12 +206,16 @@ function SetCreateZipFocus()
|
||||||
if (file.IsDirectory)
|
if (file.IsDirectory)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// Get the Editable Extensions from the System Settings
|
||||||
|
// If it has not yet been set, we will use the original WebsitePanel allowed editable extensions
|
||||||
|
EnterpriseServer.SystemSettings settings = ES.Services.Files.GetFileManagerSettings();
|
||||||
|
if (!String.IsNullOrEmpty(settings["EditableExtensions"]))
|
||||||
|
{
|
||||||
|
ALLOWED_EDIT_EXTENSIONS = settings["EditableExtensions"];
|
||||||
|
}
|
||||||
|
|
||||||
string ext = Path.GetExtension(file.Name);
|
string ext = Path.GetExtension(file.Name);
|
||||||
//allow to edit Master pages
|
return ALLOWED_EDIT_EXTENSIONS.Split(',').ToArray().Contains(ext);
|
||||||
if (ext == ".Master")
|
|
||||||
return true;
|
|
||||||
else
|
|
||||||
return ALLOWED_EDIT_EXTENSIONS.IndexOf(ext.ToLower()) != -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Path methods
|
#region Path methods
|
||||||
|
|
|
@ -58,6 +58,18 @@
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</asp:Panel>
|
</asp:Panel>
|
||||||
|
|
||||||
|
<wsp:CollapsiblePanel id="HeaderFileManagerSettings" runat="server"
|
||||||
|
TargetControlID="PanelFileManagereSettings" meta:resourcekey="HeaderFileManagerSettings" Text="File Manager"/>
|
||||||
|
|
||||||
|
<asp:Panel ID="PanelFileManagereSettings" runat="server" Height="0" style="overflow:hidden;">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td class="SubHead" style="width:200px;"><asp:Localize ID="lblFileManagerEditableExtensions" runat="server" meta:resourcekey="lblFileManagerEditableExtensions" /></td>
|
||||||
|
<td><asp:TextBox TextMode="MultiLine" Rows="10" runat="server" ID="txtFileManagerEditableExtensions" Width="300px" /><asp:Literal ID="litFileManagerEditableExtensions" runat="Server" Text=" (One (1) extension per line)"></asp:Literal></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</asp:Panel>
|
||||||
</div>
|
</div>
|
||||||
<div class="FormFooter">
|
<div class="FormFooter">
|
||||||
<asp:Button runat="server" ID="btnSaveSettings" meta:resourcekey="btnSaveSettings"
|
<asp:Button runat="server" ID="btnSaveSettings" meta:resourcekey="btnSaveSettings"
|
||||||
|
|
|
@ -38,6 +38,7 @@ using System.Web.UI.WebControls.WebParts;
|
||||||
using System.Web.UI.HtmlControls;
|
using System.Web.UI.HtmlControls;
|
||||||
using WebsitePanel.EnterpriseServer.Base.Common;
|
using WebsitePanel.EnterpriseServer.Base.Common;
|
||||||
using WSP = WebsitePanel.EnterpriseServer;
|
using WSP = WebsitePanel.EnterpriseServer;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
namespace WebsitePanel.Portal
|
namespace WebsitePanel.Portal
|
||||||
{
|
{
|
||||||
|
@ -49,6 +50,7 @@ namespace WebsitePanel.Portal
|
||||||
public const string SMTP_PASSWORD = "SmtpPassword";
|
public const string SMTP_PASSWORD = "SmtpPassword";
|
||||||
public const string SMTP_ENABLE_SSL = "SmtpEnableSsl";
|
public const string SMTP_ENABLE_SSL = "SmtpEnableSsl";
|
||||||
public const string BACKUPS_PATH = "BackupsPath";
|
public const string BACKUPS_PATH = "BackupsPath";
|
||||||
|
public const string FILE_MANAGER_EDITABLE_EXTENSIONS = "EditableExtensions";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
public const string FEED_ENABLE_MICROSOFT = "FeedEnableMicrosoft";
|
public const string FEED_ENABLE_MICROSOFT = "FeedEnableMicrosoft";
|
||||||
|
@ -122,7 +124,19 @@ namespace WebsitePanel.Portal
|
||||||
txtMainFeedUrl.Text = mainFeedUrl;
|
txtMainFeedUrl.Text = mainFeedUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FILE MANAGER
|
||||||
|
settings = ES.Services.System.GetSystemSettings(
|
||||||
|
WSP.SystemSettings.FILEMANAGER_SETTINGS);
|
||||||
|
|
||||||
|
if (settings != null)
|
||||||
|
{
|
||||||
|
txtFileManagerEditableExtensions.Text = settings[FILE_MANAGER_EDITABLE_EXTENSIONS].Replace(",", System.Environment.NewLine);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Original WebsitePanel Extensions
|
||||||
|
txtFileManagerEditableExtensions.Text = FileManager.ALLOWED_EDIT_EXTENSIONS.Replace(",", System.Environment.NewLine);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SaveSettings()
|
private void SaveSettings()
|
||||||
|
@ -179,6 +193,20 @@ namespace WebsitePanel.Portal
|
||||||
|
|
||||||
result = ES.Services.System.SetSystemSettings(WSP.SystemSettings.WPI_SETTINGS, settings);
|
result = ES.Services.System.SetSystemSettings(WSP.SystemSettings.WPI_SETTINGS, settings);
|
||||||
|
|
||||||
|
if (result < 0)
|
||||||
|
{
|
||||||
|
ShowResultMessage(result);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE MANAGER
|
||||||
|
settings = new WSP.SystemSettings();
|
||||||
|
settings[FILE_MANAGER_EDITABLE_EXTENSIONS] = Regex.Replace(txtFileManagerEditableExtensions.Text, @"[\r\n]+", ",");
|
||||||
|
|
||||||
|
|
||||||
|
result = ES.Services.System.SetSystemSettings(
|
||||||
|
WSP.SystemSettings.FILEMANAGER_SETTINGS, settings);
|
||||||
|
|
||||||
if (result < 0)
|
if (result < 0)
|
||||||
{
|
{
|
||||||
ShowResultMessage(result);
|
ShowResultMessage(result);
|
||||||
|
|
|
@ -175,6 +175,51 @@ namespace WebsitePanel.Portal {
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::WebsitePanel.Portal.UserControls.EditFeedsList wpiEditFeedsList;
|
protected global::WebsitePanel.Portal.UserControls.EditFeedsList wpiEditFeedsList;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// HeaderFileManagerSettings control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::WebsitePanel.Portal.CollapsiblePanel HeaderFileManagerSettings;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PanelFileManagereSettings control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.Panel PanelFileManagereSettings;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// lblFileManagerEditableExtensions control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.Localize lblFileManagerEditableExtensions;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtFileManagerEditableExtensions control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.TextBox txtFileManagerEditableExtensions;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// litFileManagerEditableExtensions control.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Auto-generated field.
|
||||||
|
/// To modify move field declaration from designer file to code-behind file.
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.Literal litFileManagerEditableExtensions;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// btnSaveSettings control.
|
/// btnSaveSettings control.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue