fixed bug with groups quota.

This commit is contained in:
vfedosevich 2014-05-07 14:57:14 +03:00
parent a79daf78f9
commit d4ecd7ba29

View file

@ -1670,11 +1670,11 @@ END
GO GO
--add SecurityGroupManagement Quota --add SecurityGroupManagement Quota
IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'HostedSolution.SecurityGroupManagement') --IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'HostedSolution.SecurityGroupManagement')
BEGIN --BEGIN
INSERT [dbo].[Quotas] ([QuotaID], [GroupID],[QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) VALUES (423, 13, 5, N'HostedSolution.SecurityGroupManagement', N'Allow Security Group Management', 1, 0, NULL, NULL) --INSERT [dbo].[Quotas] ([QuotaID], [GroupID],[QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) VALUES (423, 13, 5, N'HostedSolution.SecurityGroupManagement', N'Allow Security Group Management', 1, 0, NULL, NULL)
END --END
GO --GO
-- Lync Enterprise Voice -- Lync Enterprise Voice
@ -3210,22 +3210,26 @@ GO
IF EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'HostedSolution.SecurityGroupManagement' AND [QuotaID] = 423) IF EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'HostedSolution.SecurityGroupManagement' AND [QuotaID] = 423)
BEGIN BEGIN
UPDATE [dbo].[Quotas]
SET [QuotaDescription] = N'Security Groups',
[QuotaName] = N'HostedSolution.SecurityGroups',
[QuotaTypeID] = 2
WHERE [QuotaID] = 423
UPDATE [dbo].[Quotas] UPDATE [dbo].[HostingPlanQuotas]
SET [QuotaDescription] = N'Security Groups', SET [QuotaValue] = -1
[QuotaName] = N'HostedSolution.SecurityGroups', WHERE [QuotaID] = 423
[QuotaTypeID] = 2
WHERE [QuotaID] = 423
UPDATE [dbo].[HostingPlanQuotas]
SET [QuotaValue] = -1
WHERE [QuotaID] = 423
UPDATE [dbo].[PackageQuotas]
SET [QuotaValue] = -1
WHERE [QuotaID] = 423
UPDATE [dbo].[PackageQuotas]
SET [QuotaValue] = -1
WHERE [QuotaID] = 423
END END
ELSE
BEGIN
--add Security Groups Quota
IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'HostedSolution.SecurityGroups')
INSERT [dbo].[Quotas] ([QuotaID], [GroupID],[QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) VALUES (423, 13, 5, N'HostedSolution.SecurityGroups', N'Security Groups', 2, 0, NULL, NULL)
END
GO GO
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetOrganizationStatistics') IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetOrganizationStatistics')