wsp-10106: Implement Exchange Tenant Disclaimer.
This commit is contained in:
parent
eee5d732fb
commit
0ec87fc5f4
28 changed files with 11296 additions and 7215 deletions
|
@ -454,3 +454,182 @@ GO
|
|||
-- add Application Pools Restart Quota
|
||||
INSERT [dbo].[Quotas] ([QuotaID], [GroupID], [QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) VALUES (411, 2, 13, N'Web.AppPoolsRestart', N'Application Pools Restart', 1, 0, NULL, NULL)
|
||||
GO
|
||||
|
||||
-- Disclaimers
|
||||
|
||||
|
||||
GO
|
||||
SET ANSI_NULLS ON
|
||||
GO
|
||||
SET QUOTED_IDENTIFIER ON
|
||||
GO
|
||||
CREATE TABLE [dbo].[ExchangeDisclaimers](
|
||||
[ExchangeDisclaimerId] [int] IDENTITY(1,1) NOT NULL,
|
||||
[ItemID] [int] NOT NULL,
|
||||
[DisclaimerName] [nvarchar](300) NOT NULL,
|
||||
[DisclaimerText] [nvarchar](1024),
|
||||
CONSTRAINT [PK_ExchangeDisclaimers] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[ExchangeDisclaimerId] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
|
||||
)
|
||||
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'GetExchangeDisclaimers')
|
||||
BEGIN
|
||||
EXEC sp_executesql N'CREATE PROCEDURE [dbo].[GetExchangeDisclaimers]
|
||||
(
|
||||
@ItemID int
|
||||
)
|
||||
AS
|
||||
SELECT
|
||||
ExchangeDisclaimerId,
|
||||
ItemID,
|
||||
DisclaimerName,
|
||||
DisclaimerText
|
||||
FROM
|
||||
ExchangeDisclaimers
|
||||
WHERE
|
||||
ItemID = @ItemID
|
||||
ORDER BY DisclaimerName
|
||||
RETURN'
|
||||
END
|
||||
GO
|
||||
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'DeleteExchangeDisclaimer')
|
||||
BEGIN
|
||||
EXEC sp_executesql N'CREATE PROCEDURE [dbo].[DeleteExchangeDisclaimer]
|
||||
(
|
||||
@ExchangeDisclaimerId int
|
||||
)
|
||||
AS
|
||||
|
||||
DELETE FROM ExchangeDisclaimers
|
||||
WHERE ExchangeDisclaimerId = @ExchangeDisclaimerId
|
||||
|
||||
RETURN'
|
||||
END
|
||||
GO
|
||||
|
||||
--
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'UpdateExchangeDisclaimer')
|
||||
BEGIN
|
||||
EXEC sp_executesql N' CREATE PROCEDURE [dbo].[UpdateExchangeDisclaimer]
|
||||
(
|
||||
@ExchangeDisclaimerId int,
|
||||
@DisclaimerName nvarchar(300),
|
||||
@DisclaimerText nvarchar(1024)
|
||||
)
|
||||
AS
|
||||
|
||||
UPDATE ExchangeDisclaimers SET
|
||||
DisclaimerName = @DisclaimerName,
|
||||
DisclaimerText = @DisclaimerText
|
||||
|
||||
WHERE ExchangeDisclaimerId = @ExchangeDisclaimerId
|
||||
|
||||
RETURN'
|
||||
END
|
||||
GO
|
||||
|
||||
--
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'AddExchangeDisclaimer')
|
||||
BEGIN
|
||||
EXEC sp_executesql N'CREATE PROCEDURE [dbo].[AddExchangeDisclaimer]
|
||||
(
|
||||
@ExchangeDisclaimerId int OUTPUT,
|
||||
@ItemID int,
|
||||
@DisclaimerName nvarchar(300),
|
||||
@DisclaimerText nvarchar(1024)
|
||||
)
|
||||
AS
|
||||
|
||||
INSERT INTO ExchangeDisclaimers
|
||||
(
|
||||
ItemID,
|
||||
DisclaimerName,
|
||||
DisclaimerText
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
@ItemID,
|
||||
@DisclaimerName,
|
||||
@DisclaimerText
|
||||
)
|
||||
|
||||
SET @ExchangeDisclaimerId = SCOPE_IDENTITY()
|
||||
|
||||
RETURN'
|
||||
END
|
||||
GO
|
||||
|
||||
--
|
||||
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'GetExchangeDisclaimer')
|
||||
BEGIN
|
||||
EXEC sp_executesql N'CREATE PROCEDURE [dbo].[GetExchangeDisclaimer]
|
||||
(
|
||||
@ExchangeDisclaimerId int
|
||||
)
|
||||
AS
|
||||
SELECT
|
||||
ExchangeDisclaimerId,
|
||||
ItemID,
|
||||
DisclaimerName,
|
||||
DisclaimerText
|
||||
FROM
|
||||
ExchangeDisclaimers
|
||||
WHERE
|
||||
ExchangeDisclaimerId = @ExchangeDisclaimerId
|
||||
RETURN'
|
||||
END
|
||||
GO
|
||||
|
||||
|
||||
|
||||
|
||||
BEGIN
|
||||
ALTER TABLE [dbo].[ExchangeAccounts] ADD
|
||||
|
||||
[ExchangeDisclaimerId] [int] NULL
|
||||
|
||||
END
|
||||
Go
|
||||
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'SetExchangeAccountDisclaimerId')
|
||||
BEGIN
|
||||
EXEC sp_executesql N' CREATE PROCEDURE [dbo].[SetExchangeAccountDisclaimerId]
|
||||
(
|
||||
@AccountID int,
|
||||
@ExchangeDisclaimerId int
|
||||
)
|
||||
AS
|
||||
UPDATE ExchangeAccounts SET
|
||||
ExchangeDisclaimerId = @ExchangeDisclaimerId
|
||||
WHERE AccountID = @AccountID
|
||||
|
||||
RETURN'
|
||||
END
|
||||
GO
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM sys.objects WHERE type_desc = N'SQL_STORED_PROCEDURE' AND name = N'GetExchangeAccountDisclaimerId')
|
||||
BEGIN
|
||||
EXEC sp_executesql N'CREATE PROCEDURE [dbo].[GetExchangeAccountDisclaimerId]
|
||||
(
|
||||
@AccountID int
|
||||
)
|
||||
AS
|
||||
SELECT
|
||||
ExchangeDisclaimerId
|
||||
FROM
|
||||
ExchangeAccounts
|
||||
WHERE
|
||||
AccountID= @AccountID
|
||||
RETURN'
|
||||
END
|
||||
GO
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue