added Disclaimers Quota.
This commit is contained in:
parent
6afbb17d01
commit
38604866ce
7 changed files with 43 additions and 15 deletions
|
@ -633,3 +633,8 @@ WHERE
|
|||
RETURN'
|
||||
END
|
||||
GO
|
||||
|
||||
|
||||
-- add Disclaimers Quota
|
||||
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) VALUES (422, 12, 26, N'Exchange2007.DisclaimersAllowed', N'Disclaimers Allowed', 1, 0, NULL, NULL)
|
||||
GO
|
||||
|
|
|
@ -117,6 +117,7 @@ order by rg.groupOrder
|
|||
public const string EXCHANGE2007_ENABLEDPLANSEDITING = "Exchange2007.EnablePlansEditing"; // Enabled plans editing
|
||||
public const string EXCHANGE2007_ALLOWLITIGATIONHOLD = "Exchange2007.AllowLitigationHold";
|
||||
public const string EXCHANGE2007_RECOVERABLEITEMSSPACE = "Exchange2007.RecoverableItemsSpace";
|
||||
public const string EXCHANGE2007_DISCLAIMERSALLOWED = "Exchange2007.DisclaimersAllowed";
|
||||
public const string MSSQL2000_DATABASES = "MsSQL2000.Databases"; // Databases
|
||||
public const string MSSQL2000_USERS = "MsSQL2000.Users"; // Users
|
||||
public const string MSSQL2000_MAXDATABASESIZE = "MsSQL2000.MaxDatabaseSize"; // Max Database Size
|
||||
|
|
|
@ -2892,6 +2892,9 @@
|
|||
<data name="Quota.Exchange2007.MaxReceiveMessageSizeKB" xml:space="preserve">
|
||||
<value>Maximum Receive Message Size (Kb)</value>
|
||||
</data>
|
||||
<data name="Quota.Exchange2007.DisclaimersAllowed" xml:space="preserve">
|
||||
<value>Disclaimers Allowed</value>
|
||||
</data>
|
||||
<data name="ResourceGroup.Exchange" xml:space="preserve">
|
||||
<value>Hosted Exchange</value>
|
||||
</data>
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="FormLabel150"><asp:Localize ID="Localize1" runat="server" meta:resourcekey="locDisclaimer" Text="Disclaimer: "></asp:Localize></td>
|
||||
<td class="FormLabel150"><asp:Localize ID="locDisclaimer" runat="server" meta:resourcekey="locDisclaimer" Text="Disclaimer: "></asp:Localize></td>
|
||||
<td>
|
||||
<asp:DropDownList ID="ddDisclaimer" runat="server" />
|
||||
</td>
|
||||
|
|
|
@ -37,11 +37,21 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||
|
||||
if (Utils.CheckQouta(Quotas.EXCHANGE2007_DISCLAIMERSALLOWED, cntx))
|
||||
{
|
||||
ddDisclaimer.Items.Add(new System.Web.UI.WebControls.ListItem("None", "-1"));
|
||||
ExchangeDisclaimer[] disclaimers = ES.Services.ExchangeServer.GetExchangeDisclaimers(PanelRequest.ItemID);
|
||||
foreach (ExchangeDisclaimer disclaimer in disclaimers)
|
||||
ddDisclaimer.Items.Add(new System.Web.UI.WebControls.ListItem(disclaimer.DisclaimerName, disclaimer.ExchangeDisclaimerId.ToString()));
|
||||
}
|
||||
else
|
||||
{
|
||||
locDisclaimer.Visible = false;
|
||||
ddDisclaimer.Visible = false;
|
||||
}
|
||||
|
||||
BindSettings();
|
||||
|
||||
|
@ -49,7 +59,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
|
||||
if (user != null)
|
||||
{
|
||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||
|
||||
if ((user.Role == UserRole.User) & (Utils.CheckQouta(Quotas.EXCHANGE2007_ISCONSUMER, cntx)))
|
||||
{
|
||||
chkHideAddressBook.Visible = false;
|
||||
|
@ -112,8 +122,12 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
litigationHoldSpace.QuotaUsedValue = Convert.ToInt32(stats.LitigationHoldTotalSize / 1024 / 1024);
|
||||
litigationHoldSpace.QuotaValue = (stats.LitigationHoldMaxSize == -1) ? -1 : (int)Math.Round((double)(stats.LitigationHoldMaxSize / 1024 / 1024));
|
||||
|
||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||
if (Utils.CheckQouta(Quotas.EXCHANGE2007_DISCLAIMERSALLOWED, cntx))
|
||||
{
|
||||
int disclaimerId = ES.Services.ExchangeServer.GetExchangeAccountDisclaimerId(PanelRequest.ItemID, PanelRequest.AccountID);
|
||||
ddDisclaimer.SelectedValue = disclaimerId.ToString();
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
@ -155,9 +169,13 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
}
|
||||
}
|
||||
|
||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||
if (Utils.CheckQouta(Quotas.EXCHANGE2007_DISCLAIMERSALLOWED, cntx))
|
||||
{
|
||||
int disclaimerId;
|
||||
if (int.TryParse(ddDisclaimer.SelectedValue, out disclaimerId))
|
||||
ES.Services.ExchangeServer.SetExchangeAccountDisclaimerId(PanelRequest.ItemID, PanelRequest.AccountID, disclaimerId);
|
||||
}
|
||||
|
||||
messageBox.ShowSuccessMessage("EXCHANGE_UPDATE_MAILBOX_SETTINGS");
|
||||
BindSettings();
|
||||
|
|
|
@ -148,13 +148,13 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.MailboxPlanSelector mailboxPlanSelector;
|
||||
|
||||
/// <summary>
|
||||
/// Localize1 control.
|
||||
/// locDisclaimer 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 Localize1;
|
||||
protected global::System.Web.UI.WebControls.Localize locDisclaimer;
|
||||
|
||||
/// <summary>
|
||||
/// ddDisclaimer control.
|
||||
|
|
|
@ -146,6 +146,7 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
|
|||
exchangeGroup.MenuItems.Add(CreateMenuItem("StorageUsage", "storage_usage"));
|
||||
|
||||
if (!hideItems)
|
||||
if (Utils.CheckQouta(Quotas.EXCHANGE2007_DISCLAIMERSALLOWED, cntx))
|
||||
exchangeGroup.MenuItems.Add(CreateMenuItem("Disclaimers", "disclaimers"));
|
||||
|
||||
if (exchangeGroup.MenuItems.Count > 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue