.csproj and .sln files added with added files and project respectively + randow password generator
This commit is contained in:
parent
0cb357a536
commit
1c22be13be
5 changed files with 95 additions and 21 deletions
|
@ -357,6 +357,22 @@ namespace WebsitePanel.Providers.Mail
|
|||
return mailAccounts.ToArray();
|
||||
}
|
||||
|
||||
protected void SaveProviderSettingsToService()
|
||||
{
|
||||
var apiObject = GetApiObject();
|
||||
apiObject.SetProperty("C_Accounts_Global_Domains_UseDiskQuota", ProviderSettings["UseDomainDiskQuota"]);
|
||||
apiObject.SetProperty("C_Accounts_Global_Domains_UseDomainLimits", ProviderSettings["UseDomainLimits"]);
|
||||
apiObject.SetProperty("C_Accounts_Global_Domains_UseUserLimits", ProviderSettings["UseUserLimits"]);
|
||||
apiObject.SetProperty("C_Accounts_Global_Domains_OverrideGlobal", ProviderSettings["OverrideGlobal"]);
|
||||
apiObject.SetProperty("C_Accounts_Global_Domains_WarnMailboxUsage", ProviderSettings["WarnMailboxUsage"]);
|
||||
apiObject.SetProperty("C_Accounts_Global_Domains_WarnDomainSize", ProviderSettings["WarnDomainSize"]);
|
||||
|
||||
apiObject.SetProperty("C_Mail_SMTP_Delivery_MaxMsgSize", Convert.ToInt32(ProviderSettings["MaxMessageSize"])*1024*1024);
|
||||
apiObject.SetProperty("C_Mail_SMTP_Delivery_LimitMsgSize", Convert.ToInt32(ProviderSettings["MaxMessageSize"]) > 0);
|
||||
|
||||
SaveApiSetting(apiObject);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IHostingServiceProvier methods
|
||||
|
@ -384,22 +400,6 @@ namespace WebsitePanel.Providers.Mail
|
|||
return base.Install();
|
||||
}
|
||||
|
||||
protected void SaveProviderSettingsToService()
|
||||
{
|
||||
var apiObject = GetApiObject();
|
||||
apiObject.SetProperty("C_Accounts_Global_Domains_UseDiskQuota", ProviderSettings["UseDomainDiskQuota"]);
|
||||
apiObject.SetProperty("C_Accounts_Global_Domains_UseDomainLimits", ProviderSettings["UseDomainLimits"]);
|
||||
apiObject.SetProperty("C_Accounts_Global_Domains_UseUserLimits", ProviderSettings["UseUserLimits"]);
|
||||
apiObject.SetProperty("C_Accounts_Global_Domains_OverrideGlobal", ProviderSettings["OverrideGlobal"]);
|
||||
apiObject.SetProperty("C_Accounts_Global_Domains_WarnMailboxUsage", ProviderSettings["WarnMailboxUsage"]);
|
||||
apiObject.SetProperty("C_Accounts_Global_Domains_WarnDomainSize", ProviderSettings["WarnDomainSize"]);
|
||||
|
||||
apiObject.SetProperty("C_Mail_SMTP_Delivery_MaxMsgSize", Convert.ToInt32(ProviderSettings["MaxMessageSize"])*1024*1024);
|
||||
apiObject.SetProperty("C_Mail_SMTP_Delivery_LimitMsgSize", Convert.ToInt32(ProviderSettings["MaxMessageSize"]) > 0);
|
||||
|
||||
SaveApiSetting(apiObject);
|
||||
}
|
||||
|
||||
public override void ChangeServiceItemsState(ServiceProviderItem[] items, bool enabled)
|
||||
{
|
||||
foreach (var item in items.OfType<MailDomain>())
|
||||
|
@ -1045,7 +1045,13 @@ namespace WebsitePanel.Providers.Mail
|
|||
}
|
||||
}
|
||||
|
||||
private string GetRandomPassword()
|
||||
private string GetRandowChars(string chars, int length)
|
||||
{
|
||||
var random = new Random();
|
||||
return new string(Enumerable.Repeat(chars, length).Select(s => s[random.Next(s.Length)]).ToArray());
|
||||
}
|
||||
|
||||
protected string GetRandomPassword()
|
||||
{
|
||||
var apiObject = GetApiObject();
|
||||
var minLength = apiObject.GetProperty("C_Accounts_Policies_Pass_MinLength");
|
||||
|
@ -1053,8 +1059,9 @@ namespace WebsitePanel.Providers.Mail
|
|||
var nonAlphaNum = apiObject.GetProperty("C_Accounts_Policies_Pass_NonAlphaNum");
|
||||
var alpha = apiObject.GetProperty("C_Accounts_Policies_Pass_Alpha");
|
||||
|
||||
return "asdfghjk12345678";
|
||||
// TODO: Generateapassword using password policy from icewarp installation. Is there a imple way
|
||||
return System.Web.Security.Membership.GeneratePassword(minLength, nonAlphaNum) +
|
||||
GetRandowChars("0123456789", digits)+
|
||||
GetRandowChars("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", alpha);
|
||||
}
|
||||
|
||||
public void UpdateMailAlias(MailAlias mailAlias)
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2010
|
||||
# Visual Studio 2012
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Caching Application Block", "Caching Application Block", "{C8E6F2E4-A5B8-486A-A56E-92D864524682}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
Bin\Microsoft.Practices.EnterpriseLibrary.Common.dll = Bin\Microsoft.Practices.EnterpriseLibrary.Common.dll
|
||||
|
@ -150,6 +150,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Providers.DNS.
|
|||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Providers.HostedSolution.Crm2013", "WebsitePanel.Providers.HostedSolution.Crm2013\WebsitePanel.Providers.HostedSolution.Crm2013.csproj", "{1EF935C9-6DB9-47A1-B261-CB56512DF980}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Providers.Mail.IceWarp", "WebsitePanel.Providers.Mail.IceWarp\WebsitePanel.Providers.Mail.IceWarp.csproj", "{95EA2D6E-278C-4A74-97DB-946362C4DEEA}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
@ -760,6 +762,16 @@ Global
|
|||
{1EF935C9-6DB9-47A1-B261-CB56512DF980}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{1EF935C9-6DB9-47A1-B261-CB56512DF980}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{1EF935C9-6DB9-47A1-B261-CB56512DF980}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{95EA2D6E-278C-4A74-97DB-946362C4DEEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{95EA2D6E-278C-4A74-97DB-946362C4DEEA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{95EA2D6E-278C-4A74-97DB-946362C4DEEA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{95EA2D6E-278C-4A74-97DB-946362C4DEEA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{95EA2D6E-278C-4A74-97DB-946362C4DEEA}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{95EA2D6E-278C-4A74-97DB-946362C4DEEA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{95EA2D6E-278C-4A74-97DB-946362C4DEEA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{95EA2D6E-278C-4A74-97DB-946362C4DEEA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{95EA2D6E-278C-4A74-97DB-946362C4DEEA}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{95EA2D6E-278C-4A74-97DB-946362C4DEEA}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<OldToolsVersion>4.0</OldToolsVersion>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile />
|
||||
<UseIISExpress>false</UseIISExpress>
|
||||
<IISExpressSSLPort />
|
||||
|
@ -79,6 +79,7 @@
|
|||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.ServiceProcess" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.ApplicationServices" />
|
||||
<Reference Include="System.Web.DynamicData" />
|
||||
<Reference Include="System.Web.Entity" />
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
|
|
|
@ -539,6 +539,48 @@
|
|||
<Compile Include="ProviderControls\hMailServer5_Settings.ascx.designer.cs">
|
||||
<DependentUpon>hMailServer5_Settings.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ProviderControls\IceWarp_EditAccount.ascx.cs">
|
||||
<DependentUpon>IceWarp_EditAccount.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ProviderControls\IceWarp_EditAccount.ascx.designer.cs">
|
||||
<DependentUpon>IceWarp_EditAccount.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ProviderControls\IceWarp_EditDomain.ascx.cs">
|
||||
<DependentUpon>IceWarp_EditDomain.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ProviderControls\IceWarp_EditDomain.ascx.designer.cs">
|
||||
<DependentUpon>IceWarp_EditDomain.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ProviderControls\IceWarp_EditForwarding.ascx.cs">
|
||||
<DependentUpon>IceWarp_EditForwarding.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ProviderControls\IceWarp_EditForwarding.ascx.designer.cs">
|
||||
<DependentUpon>IceWarp_EditForwarding.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ProviderControls\IceWarp_EditGroup.ascx.cs">
|
||||
<DependentUpon>IceWarp_EditGroup.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ProviderControls\IceWarp_EditGroup.ascx.designer.cs">
|
||||
<DependentUpon>IceWarp_EditGroup.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ProviderControls\IceWarp_EditList.ascx.cs">
|
||||
<DependentUpon>IceWarp_EditList.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ProviderControls\IceWarp_EditList.ascx.designer.cs">
|
||||
<DependentUpon>IceWarp_EditList.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ProviderControls\IceWarp_Settings.ascx.cs">
|
||||
<DependentUpon>IceWarp_Settings.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ProviderControls\IceWarp_Settings.ascx.designer.cs">
|
||||
<DependentUpon>IceWarp_Settings.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ProviderControls\Lync_Settings.ascx.cs">
|
||||
<DependentUpon>Lync_Settings.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
@ -4125,6 +4167,12 @@
|
|||
<Content Include="ProviderControls\CRM2011_Settings.ascx" />
|
||||
<Content Include="ProviderControls\EnterpriseStorage_Settings.ascx" />
|
||||
<Content Include="ProviderControls\HeliconZoo_Settings.ascx" />
|
||||
<Content Include="ProviderControls\IceWarp_EditAccount.ascx" />
|
||||
<Content Include="ProviderControls\IceWarp_EditDomain.ascx" />
|
||||
<Content Include="ProviderControls\IceWarp_EditForwarding.ascx" />
|
||||
<Content Include="ProviderControls\IceWarp_EditGroup.ascx" />
|
||||
<Content Include="ProviderControls\IceWarp_EditList.ascx" />
|
||||
<Content Include="ProviderControls\IceWarp_Settings.ascx" />
|
||||
<Content Include="ProviderControls\RDS_Settings.ascx" />
|
||||
<Content Include="ServersEditWebPlatformInstaller.ascx" />
|
||||
<Content Include="ExchangeServer\ExchangeMailboxPlans.ascx" />
|
||||
|
@ -5368,6 +5416,11 @@
|
|||
<Content Include="App_LocalResources\UserOrganization.ascx.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<Content Include="ProviderControls\App_LocalResources\IceWarp_EditAccount.ascx.resx" />
|
||||
<Content Include="ProviderControls\App_LocalResources\IceWarp_EditDomain.ascx.resx" />
|
||||
<Content Include="ProviderControls\App_LocalResources\IceWarp_EditGroup.ascx.resx" />
|
||||
<Content Include="ProviderControls\App_LocalResources\IceWarp_EditList.ascx.resx" />
|
||||
<Content Include="ProviderControls\App_LocalResources\IceWarp_Settings.ascx.resx" />
|
||||
<EmbeddedResource Include="UserControls\App_LocalResources\EditDomainsList.ascx.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue