Exchange Shared and Resource mailboxes : AccountType fix
This commit is contained in:
parent
f54b1b8466
commit
b4ce9904b4
13 changed files with 43 additions and 32 deletions
|
@ -6122,9 +6122,9 @@ END
|
||||||
IF -1 IN (SELECT B.MailboxSizeMB FROM ExchangeAccounts AS A INNER JOIN ExchangeMailboxPlans AS B ON A.MailboxPlanId = B.MailboxPlanId WHERE A.ItemID=@ItemID)
|
IF -1 IN (SELECT B.MailboxSizeMB FROM ExchangeAccounts AS A INNER JOIN ExchangeMailboxPlans AS B ON A.MailboxPlanId = B.MailboxPlanId WHERE A.ItemID=@ItemID)
|
||||||
BEGIN
|
BEGIN
|
||||||
SELECT
|
SELECT
|
||||||
(SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 1 OR AccountType = 5 OR AccountType = 6) AND ItemID = @ItemID) AS CreatedMailboxes,
|
(SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 1) AND ItemID = @ItemID) AS CreatedMailboxes,
|
||||||
(SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 10) AND ItemID = @ItemID) AS CreatedSharedMailboxes,
|
(SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 10) AND ItemID = @ItemID) AS CreatedSharedMailboxes,
|
||||||
(SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 11) AND ItemID = @ItemID) AS CreatedResourceMailboxes,
|
(SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 5 OR AccountType = 6) AND ItemID = @ItemID) AS CreatedResourceMailboxes,
|
||||||
(SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 2 AND ItemID = @ItemID) AS CreatedContacts,
|
(SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 2 AND ItemID = @ItemID) AS CreatedContacts,
|
||||||
(SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 3 AND ItemID = @ItemID) AS CreatedDistributionLists,
|
(SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 3 AND ItemID = @ItemID) AS CreatedDistributionLists,
|
||||||
(SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 4 AND ItemID = @ItemID) AS CreatedPublicFolders,
|
(SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 4 AND ItemID = @ItemID) AS CreatedPublicFolders,
|
||||||
|
@ -6136,9 +6136,9 @@ END
|
||||||
ELSE
|
ELSE
|
||||||
BEGIN
|
BEGIN
|
||||||
SELECT
|
SELECT
|
||||||
(SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 1 OR AccountType = 5 OR AccountType = 6) AND ItemID = @ItemID) AS CreatedMailboxes,
|
(SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 1) AND ItemID = @ItemID) AS CreatedMailboxes,
|
||||||
(SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 10) AND ItemID = @ItemID) AS CreatedSharedMailboxes,
|
(SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 10) AND ItemID = @ItemID) AS CreatedSharedMailboxes,
|
||||||
(SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 11) AND ItemID = @ItemID) AS CreatedResourceMailboxes,
|
(SELECT COUNT(*) FROM ExchangeAccounts WHERE (AccountType = 5 OR AccountType = 6) AND ItemID = @ItemID) AS CreatedResourceMailboxes,
|
||||||
(SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 2 AND ItemID = @ItemID) AS CreatedContacts,
|
(SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 2 AND ItemID = @ItemID) AS CreatedContacts,
|
||||||
(SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 3 AND ItemID = @ItemID) AS CreatedDistributionLists,
|
(SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 3 AND ItemID = @ItemID) AS CreatedDistributionLists,
|
||||||
(SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 4 AND ItemID = @ItemID) AS CreatedPublicFolders,
|
(SELECT COUNT(*) FROM ExchangeAccounts WHERE AccountType = 4 AND ItemID = @ItemID) AS CreatedPublicFolders,
|
||||||
|
|
|
@ -1679,7 +1679,7 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
if ((orgStats.AllocatedSharedMailboxes > -1) && (orgStats.CreatedSharedMailboxes >= orgStats.AllocatedSharedMailboxes))
|
if ((orgStats.AllocatedSharedMailboxes > -1) && (orgStats.CreatedSharedMailboxes >= orgStats.AllocatedSharedMailboxes))
|
||||||
return BusinessErrorCodes.ERROR_EXCHANGE_MAILBOXES_QUOTA_LIMIT;
|
return BusinessErrorCodes.ERROR_EXCHANGE_MAILBOXES_QUOTA_LIMIT;
|
||||||
}
|
}
|
||||||
else if (accountType == ExchangeAccountType.ResourceMailbox)
|
else if ((accountType == ExchangeAccountType.Room) || (accountType == ExchangeAccountType.Equipment))
|
||||||
{
|
{
|
||||||
if ((orgStats.AllocatedResourceMailboxes > -1) && (orgStats.CreatedResourceMailboxes >= orgStats.AllocatedResourceMailboxes))
|
if ((orgStats.AllocatedResourceMailboxes > -1) && (orgStats.CreatedResourceMailboxes >= orgStats.AllocatedResourceMailboxes))
|
||||||
return BusinessErrorCodes.ERROR_EXCHANGE_MAILBOXES_QUOTA_LIMIT;
|
return BusinessErrorCodes.ERROR_EXCHANGE_MAILBOXES_QUOTA_LIMIT;
|
||||||
|
|
|
@ -40,7 +40,6 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
User = 7,
|
User = 7,
|
||||||
SecurityGroup = 8,
|
SecurityGroup = 8,
|
||||||
DefaultSecurityGroup = 9,
|
DefaultSecurityGroup = 9,
|
||||||
SharedMailbox = 10,
|
SharedMailbox = 10
|
||||||
ResourceMailbox = 11
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1944,8 +1944,6 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
cmd.Parameters.Add("Room");
|
cmd.Parameters.Add("Room");
|
||||||
else if (accountType == ExchangeAccountType.SharedMailbox)
|
else if (accountType == ExchangeAccountType.SharedMailbox)
|
||||||
cmd.Parameters.Add("Shared");
|
cmd.Parameters.Add("Shared");
|
||||||
else if (accountType == ExchangeAccountType.ResourceMailbox)
|
|
||||||
cmd.Parameters.Add("Equipment");
|
|
||||||
|
|
||||||
|
|
||||||
result = ExecuteShellCommand(runSpace, cmd);
|
result = ExecuteShellCommand(runSpace, cmd);
|
||||||
|
|
|
@ -371,8 +371,6 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
cmd.Parameters.Add("Room");
|
cmd.Parameters.Add("Room");
|
||||||
else if (accountType == ExchangeAccountType.SharedMailbox)
|
else if (accountType == ExchangeAccountType.SharedMailbox)
|
||||||
cmd.Parameters.Add("Shared");
|
cmd.Parameters.Add("Shared");
|
||||||
else if (accountType == ExchangeAccountType.ResourceMailbox)
|
|
||||||
cmd.Parameters.Add("Equipment");
|
|
||||||
|
|
||||||
result = ExecuteShellCommand(runSpace, cmd);
|
result = ExecuteShellCommand(runSpace, cmd);
|
||||||
|
|
||||||
|
|
|
@ -5599,10 +5599,13 @@
|
||||||
<data name="Quota.Exchange2013.SharedMailboxes" xml:space="preserve">
|
<data name="Quota.Exchange2013.SharedMailboxes" xml:space="preserve">
|
||||||
<value>Shared Mailboxes per Organization</value>
|
<value>Shared Mailboxes per Organization</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ResourceMailbox.Text" xml:space="preserve">
|
<data name="RoomMailbox.Text" xml:space="preserve">
|
||||||
<value> (resource mailbox)</value>
|
<value> (room mailbox)</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SharedMailbox.Text" xml:space="preserve">
|
<data name="SharedMailbox.Text" xml:space="preserve">
|
||||||
<value> (shared mailbox)</value>
|
<value> (shared mailbox)</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="EquipmentMailbox.Text" xml:space="preserve">
|
||||||
|
<value> (equipment mailbox)</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
Binary file not shown.
After Width: | Height: | Size: 226 B |
|
@ -186,9 +186,6 @@
|
||||||
<data name="valRequireSubscriberNumber.Text" xml:space="preserve">
|
<data name="valRequireSubscriberNumber.Text" xml:space="preserve">
|
||||||
<value>*</value>
|
<value>*</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ResourceMailbox.Text" xml:space="preserve">
|
|
||||||
<value>Resource Mailbox</value>
|
|
||||||
</data>
|
|
||||||
<data name="SharedMailbox.Text" xml:space="preserve">
|
<data name="SharedMailbox.Text" xml:space="preserve">
|
||||||
<value>Shared Mailbox</value>
|
<value>Shared Mailbox</value>
|
||||||
</data>
|
</data>
|
||||||
|
|
|
@ -91,29 +91,36 @@ namespace WebsitePanel.Portal.ExchangeServer
|
||||||
if (plans.Length == 0)
|
if (plans.Length == 0)
|
||||||
btnCreate.Enabled = false;
|
btnCreate.Enabled = false;
|
||||||
|
|
||||||
|
bool allowResourceMailbox = false;
|
||||||
|
|
||||||
if (cntx.Quotas.ContainsKey(Quotas.EXCHANGE2007_ISCONSUMER))
|
if (cntx.Quotas.ContainsKey(Quotas.EXCHANGE2007_ISCONSUMER))
|
||||||
{
|
{
|
||||||
if (cntx.Quotas[Quotas.EXCHANGE2007_ISCONSUMER].QuotaAllocatedValue != 1)
|
if (cntx.Quotas[Quotas.EXCHANGE2007_ISCONSUMER].QuotaAllocatedValue != 1)
|
||||||
{
|
{
|
||||||
locSubscriberNumber.Visible = txtSubscriberNumber.Visible = valRequireSubscriberNumber.Enabled = false;
|
locSubscriberNumber.Visible = txtSubscriberNumber.Visible = valRequireSubscriberNumber.Enabled = false;
|
||||||
|
allowResourceMailbox = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cntx.Quotas.ContainsKey(Quotas.EXCHANGE2013_RESOURCEMAILBOXES))
|
||||||
|
{
|
||||||
|
if (cntx.Quotas[Quotas.EXCHANGE2013_RESOURCEMAILBOXES].QuotaAllocatedValue != 0)
|
||||||
|
allowResourceMailbox = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (allowResourceMailbox)
|
||||||
|
{
|
||||||
rbMailboxType.Items.Add(new System.Web.UI.WebControls.ListItem(GetLocalizedString("RoomMailbox.Text"), "5"));
|
rbMailboxType.Items.Add(new System.Web.UI.WebControls.ListItem(GetLocalizedString("RoomMailbox.Text"), "5"));
|
||||||
rbMailboxType.Items.Add(new System.Web.UI.WebControls.ListItem(GetLocalizedString("EquipmentMailbox.Text"), "6"));
|
rbMailboxType.Items.Add(new System.Web.UI.WebControls.ListItem(GetLocalizedString("EquipmentMailbox.Text"), "6"));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (cntx.Quotas.ContainsKey(Quotas.EXCHANGE2013_SHAREDMAILBOXES))
|
if (cntx.Quotas.ContainsKey(Quotas.EXCHANGE2013_SHAREDMAILBOXES))
|
||||||
{
|
{
|
||||||
if (cntx.Quotas[Quotas.EXCHANGE2013_SHAREDMAILBOXES].QuotaAllocatedValue != 0)
|
if (cntx.Quotas[Quotas.EXCHANGE2013_SHAREDMAILBOXES].QuotaAllocatedValue != 0)
|
||||||
rbMailboxType.Items.Add(new System.Web.UI.WebControls.ListItem(GetLocalizedString("SharedMailbox.Text"), "10"));
|
rbMailboxType.Items.Add(new System.Web.UI.WebControls.ListItem(GetLocalizedString("SharedMailbox.Text"), "10"));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cntx.Quotas.ContainsKey(Quotas.EXCHANGE2013_RESOURCEMAILBOXES))
|
|
||||||
{
|
|
||||||
if (cntx.Quotas[Quotas.EXCHANGE2013_RESOURCEMAILBOXES].QuotaAllocatedValue != 0)
|
|
||||||
rbMailboxType.Items.Add(new System.Web.UI.WebControls.ListItem(GetLocalizedString("ResourceMailbox.Text"), "11"));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
rowRetentionPolicy.Visible = Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWRETENTIONPOLICY, cntx);
|
rowRetentionPolicy.Visible = Utils.CheckQouta(Quotas.EXCHANGE2013_ALLOWRETENTIONPOLICY, cntx);
|
||||||
}
|
}
|
||||||
|
|
|
@ -186,8 +186,11 @@ namespace WebsitePanel.Portal.ExchangeServer
|
||||||
if (account.AccountType == ExchangeAccountType.SharedMailbox)
|
if (account.AccountType == ExchangeAccountType.SharedMailbox)
|
||||||
litDisplayName.Text += GetSharedLocalizedString("SharedMailbox.Text");
|
litDisplayName.Text += GetSharedLocalizedString("SharedMailbox.Text");
|
||||||
|
|
||||||
if (account.AccountType == ExchangeAccountType.ResourceMailbox)
|
if (account.AccountType == ExchangeAccountType.Room)
|
||||||
litDisplayName.Text += GetSharedLocalizedString("ResourceMailbox.Text");
|
litDisplayName.Text += GetSharedLocalizedString("RoomMailbox.Text");
|
||||||
|
|
||||||
|
if (account.AccountType == ExchangeAccountType.Equipment)
|
||||||
|
litDisplayName.Text += GetSharedLocalizedString("EquipmentMailbox.Text");
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
|
@ -74,8 +74,11 @@ namespace WebsitePanel.Portal.ExchangeServer
|
||||||
if (account.AccountType == ExchangeAccountType.SharedMailbox)
|
if (account.AccountType == ExchangeAccountType.SharedMailbox)
|
||||||
litDisplayName.Text += GetSharedLocalizedString("SharedMailbox.Text");
|
litDisplayName.Text += GetSharedLocalizedString("SharedMailbox.Text");
|
||||||
|
|
||||||
if (account.AccountType == ExchangeAccountType.ResourceMailbox)
|
if (account.AccountType == ExchangeAccountType.Room)
|
||||||
litDisplayName.Text += GetSharedLocalizedString("ResourceMailbox.Text");
|
litDisplayName.Text += GetSharedLocalizedString("RoomMailbox.Text");
|
||||||
|
|
||||||
|
if (account.AccountType == ExchangeAccountType.Equipment)
|
||||||
|
litDisplayName.Text += GetSharedLocalizedString("EquipmentMailbox.Text");
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
|
@ -108,7 +108,7 @@
|
||||||
OnSelected="odsAccountsPaged_Selected">
|
OnSelected="odsAccountsPaged_Selected">
|
||||||
<SelectParameters>
|
<SelectParameters>
|
||||||
<asp:QueryStringParameter Name="itemId" QueryStringField="ItemID" DefaultValue="0" />
|
<asp:QueryStringParameter Name="itemId" QueryStringField="ItemID" DefaultValue="0" />
|
||||||
<asp:Parameter Name="accountTypes" DefaultValue="1,5,6,10,11" />
|
<asp:Parameter Name="accountTypes" DefaultValue="1,5,6,10" />
|
||||||
<asp:ControlParameter Name="filterColumn" ControlID="ddlSearchColumn" PropertyName="SelectedValue" />
|
<asp:ControlParameter Name="filterColumn" ControlID="ddlSearchColumn" PropertyName="SelectedValue" />
|
||||||
<asp:ControlParameter Name="filterValue" ControlID="txtSearchValue" PropertyName="Text" />
|
<asp:ControlParameter Name="filterValue" ControlID="txtSearchValue" PropertyName="Text" />
|
||||||
<asp:Parameter Name="archiving" Type="Boolean" />
|
<asp:Parameter Name="archiving" Type="Boolean" />
|
||||||
|
|
|
@ -151,6 +151,7 @@ namespace WebsitePanel.Portal.ExchangeServer
|
||||||
{
|
{
|
||||||
ExchangeAccountType accountType = (ExchangeAccountType)accountTypeId;
|
ExchangeAccountType accountType = (ExchangeAccountType)accountTypeId;
|
||||||
string imgName = "mailbox_16.gif";
|
string imgName = "mailbox_16.gif";
|
||||||
|
|
||||||
if (accountType == ExchangeAccountType.Contact)
|
if (accountType == ExchangeAccountType.Contact)
|
||||||
imgName = "contact_16.gif";
|
imgName = "contact_16.gif";
|
||||||
else if (accountType == ExchangeAccountType.DistributionList)
|
else if (accountType == ExchangeAccountType.DistributionList)
|
||||||
|
@ -159,6 +160,8 @@ namespace WebsitePanel.Portal.ExchangeServer
|
||||||
imgName = "room_16.gif";
|
imgName = "room_16.gif";
|
||||||
else if (accountType == ExchangeAccountType.Equipment)
|
else if (accountType == ExchangeAccountType.Equipment)
|
||||||
imgName = "equipment_16.gif";
|
imgName = "equipment_16.gif";
|
||||||
|
else if (accountType == ExchangeAccountType.SharedMailbox)
|
||||||
|
imgName = "shared_16.gif";
|
||||||
|
|
||||||
if (vip && cntx.Groups.ContainsKey(ResourceGroups.ServiceLevels)) imgName = "vip_user_16.png";
|
if (vip && cntx.Groups.ContainsKey(ResourceGroups.ServiceLevels)) imgName = "vip_user_16.png";
|
||||||
|
|
||||||
|
@ -259,13 +262,13 @@ namespace WebsitePanel.Portal.ExchangeServer
|
||||||
chkMailboxes.Checked = true;
|
chkMailboxes.Checked = true;
|
||||||
|
|
||||||
if (chkMailboxes.Checked)
|
if (chkMailboxes.Checked)
|
||||||
accountTypes.AddRange(new string[] {"1","5","6"});
|
accountTypes.Add("1");
|
||||||
|
|
||||||
if (chkSharedMailboxes.Checked)
|
if (chkSharedMailboxes.Checked)
|
||||||
accountTypes.Add("10");
|
accountTypes.Add("10");
|
||||||
|
|
||||||
if (chkResourceMailboxes.Checked)
|
if (chkResourceMailboxes.Checked)
|
||||||
accountTypes.Add("11");
|
accountTypes.AddRange(new string[] {"5","6"});
|
||||||
|
|
||||||
odsAccountsPaged.SelectParameters["accountTypes"].DefaultValue = string.Join(",", accountTypes);
|
odsAccountsPaged.SelectParameters["accountTypes"].DefaultValue = string.Join(",", accountTypes);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue