diff --git a/WebsitePanel/Database/install_db.sql b/WebsitePanel/Database/install_db.sql
index ce2eec74..e6409576 100644
--- a/WebsitePanel/Database/install_db.sql
+++ b/WebsitePanel/Database/install_db.sql
@@ -44770,6 +44770,11 @@ CREATE PROCEDURE [dbo].[AddExchangeMailboxPlan]
)
AS
+IF ((SELECT Count(*) FROM ExchangeMailboxPlans WHERE ItemId = @ItemID) = 0)
+BEGIN
+ SET @IsDefault = 1
+END
+
INSERT INTO ExchangeMailboxPlans
(
ItemID,
@@ -45038,6 +45043,12 @@ CREATE PROCEDURE [dbo].[AddLyncUserPlan]
)
AS
+IF ((SELECT Count(*) FROM LyncUserPlans WHERE ItemId = @ItemID) = 0)
+BEGIN
+ SET @IsDefault = 1
+END
+
+
INSERT INTO LyncUserPlans
(
ItemID,
diff --git a/WebsitePanel/Database/update_db.sql b/WebsitePanel/Database/update_db.sql
index be2d9848..d3d09146 100644
--- a/WebsitePanel/Database/update_db.sql
+++ b/WebsitePanel/Database/update_db.sql
@@ -1931,6 +1931,11 @@ CREATE PROCEDURE [dbo].[AddExchangeMailboxPlan]
)
AS
+IF ((SELECT Count(*) FROM ExchangeMailboxPlans WHERE ItemId = @ItemID) = 0)
+BEGIN
+ SET @IsDefault = 1
+END
+
INSERT INTO ExchangeMailboxPlans
(
ItemID,
@@ -1983,6 +1988,83 @@ GO
+ALTER PROCEDURE [dbo].[AddExchangeMailboxPlan]
+(
+ @MailboxPlanId int OUTPUT,
+ @ItemID int,
+ @MailboxPlan nvarchar(300),
+ @EnableActiveSync bit,
+ @EnableIMAP bit,
+ @EnableMAPI bit,
+ @EnableOWA bit,
+ @EnablePOP bit,
+ @IsDefault bit,
+ @IssueWarningPct int,
+ @KeepDeletedItemsDays int,
+ @MailboxSizeMB int,
+ @MaxReceiveMessageSizeKB int,
+ @MaxRecipients int,
+ @MaxSendMessageSizeKB int,
+ @ProhibitSendPct int,
+ @ProhibitSendReceivePct int ,
+ @HideFromAddressBook bit
+)
+AS
+
+IF ((SELECT Count(*) FROM ExchangeMailboxPlans WHERE ItemId = @ItemID) = 0)
+BEGIN
+ SET @IsDefault = 1
+END
+
+INSERT INTO ExchangeMailboxPlans
+(
+ ItemID,
+ MailboxPlan,
+ EnableActiveSync,
+ EnableIMAP,
+ EnableMAPI,
+ EnableOWA,
+ EnablePOP,
+ IsDefault,
+ IssueWarningPct,
+ KeepDeletedItemsDays,
+ MailboxSizeMB,
+ MaxReceiveMessageSizeKB,
+ MaxRecipients,
+ MaxSendMessageSizeKB,
+ ProhibitSendPct,
+ ProhibitSendReceivePct,
+ HideFromAddressBook
+)
+VALUES
+(
+ @ItemID,
+ @MailboxPlan,
+ @EnableActiveSync,
+ @EnableIMAP,
+ @EnableMAPI,
+ @EnableOWA,
+ @EnablePOP,
+ @IsDefault,
+ @IssueWarningPct,
+ @KeepDeletedItemsDays,
+ @MailboxSizeMB,
+ @MaxReceiveMessageSizeKB,
+ @MaxRecipients,
+ @MaxSendMessageSizeKB,
+ @ProhibitSendPct,
+ @ProhibitSendReceivePct,
+ @HideFromAddressBook
+)
+
+SET @MailboxPlanId = SCOPE_IDENTITY()
+
+RETURN
+
+GO
+
+
+
@@ -3112,6 +3194,11 @@ EXEC sp_executesql N'CREATE PROCEDURE [dbo].[AddLyncUserPlan]
)
AS
+IF ((SELECT Count(*) FROM LyncUserPlans WHERE ItemId = @ItemID) = 0)
+BEGIN
+ SET @IsDefault = 1
+END
+
INSERT INTO LyncUserPlans
(
ItemID,
@@ -3147,6 +3234,62 @@ GO
+ALTER PROCEDURE [dbo].[AddLyncUserPlan]
+(
+ @LyncUserPlanId int OUTPUT,
+ @ItemID int,
+ @LyncUserPlanName nvarchar(300),
+ @IM bit,
+ @Mobility bit,
+ @MobilityEnableOutsideVoice bit,
+ @Federation bit,
+ @Conferencing bit,
+ @EnterpriseVoice bit,
+ @VoicePolicy int,
+ @IsDefault bit
+)
+AS
+
+IF ((SELECT Count(*) FROM LyncUserPlans WHERE ItemId = @ItemID) = 0)
+BEGIN
+ SET @IsDefault = 1
+END
+
+
+INSERT INTO LyncUserPlans
+(
+ ItemID,
+ LyncUserPlanName,
+ IM,
+ Mobility,
+ MobilityEnableOutsideVoice,
+ Federation,
+ Conferencing,
+ EnterpriseVoice,
+ VoicePolicy,
+ IsDefault
+)
+VALUES
+(
+ @ItemID,
+ @LyncUserPlanName,
+ @IM,
+ @Mobility,
+ @MobilityEnableOutsideVoice,
+ @Federation,
+ @Conferencing,
+ @EnterpriseVoice,
+ @VoicePolicy,
+ @IsDefault
+)
+
+SET @LyncUserPlanId = SCOPE_IDENTITY()
+
+RETURN
+GO
+
+
+
IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'CheckLyncUserExists')
BEGIN
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx
index 8e412c58..4ce46d09 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx
@@ -2697,6 +2697,9 @@
Delete mailbox
+
+ Delete mailboxplan
+
Delete mailbox e-mail addresses
@@ -2889,6 +2892,9 @@
Error deleting mailbox. See audit log for more details.
+
+ Unable to delete mailboxplan. Make sure the mailbox plan is not assigned to any mailbox
+
Error deleting Exchange organization. See audit log for more details.
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/Code/SecureSessionModule.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/Code/SecureSessionModule.cs
index 580b5cd5..5c3087e8 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/Code/SecureSessionModule.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/Code/SecureSessionModule.cs
@@ -72,6 +72,8 @@ namespace WebsitePanel.WebPortal
{
FormsAuthentication.SignOut();
HttpContext.Current.Response.Redirect(DefaultPage.GetPageUrl(PortalConfiguration.SiteSettings["DefaultPage"]));
+ cookie.Value = GetSessionIDMac(cookie.Value, request.UserHostAddress, request.UserAgent, _ValidationKey);
+ return;
}
// Separate the session ID and the MAC
@@ -87,6 +89,8 @@ namespace WebsitePanel.WebPortal
{
FormsAuthentication.SignOut();
HttpContext.Current.Response.Redirect(DefaultPage.GetPageUrl(PortalConfiguration.SiteSettings["DefaultPage"]));
+ cookie.Value = GetSessionIDMac(cookie.Value, request.UserHostAddress, request.UserAgent, _ValidationKey);
+
}
// Strip the MAC from the cookie before ASP.NET sees it
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxPlanSelector.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxPlanSelector.ascx.cs
index 77ca867b..17f6f552 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxPlanSelector.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/MailboxPlanSelector.ascx.cs
@@ -35,7 +35,6 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
{
private string mailboxPlanToSelect;
- private bool addNone;
public string MailboxPlanId
{
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserAccountDetails.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserAccountDetails.ascx.cs
index 5fecd227..5492d0fe 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserAccountDetails.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserAccountDetails.ascx.cs
@@ -97,8 +97,11 @@ namespace WebsitePanel.Portal
lnkChangePassword.Visible = !((PanelSecurity.SelectedUserId == PanelSecurity.EffectiveUserId) && PanelSecurity.LoggedUser.IsPeer);
lnkDelete.NavigateUrl = EditUrl("UserID", PanelSecurity.SelectedUserId.ToString(), "delete");
- if ((PanelSecurity.LoggedUser.Role != UserRole.Reseller) | (PanelSecurity.LoggedUser.Role != UserRole.Administrator)) lnkDelete.Visible = false;
- else lnkDelete.Visible = (PanelSecurity.SelectedUserId != PanelSecurity.EffectiveUserId);
+
+ if (!((PanelSecurity.LoggedUser.Role == UserRole.Reseller) | (PanelSecurity.LoggedUser.Role == UserRole.Administrator)))
+ lnkDelete.Visible = false;
+ else
+ lnkDelete.Visible = (PanelSecurity.SelectedUserId != PanelSecurity.EffectiveUserId);
}
}