mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 15:42:48 -05:00
user premium validation job
This commit is contained in:
46
util/Setup/DbScripts/2017-08-22_00_LicenseCheckScripts.sql
Normal file
46
util/Setup/DbScripts/2017-08-22_00_LicenseCheckScripts.sql
Normal file
@ -0,0 +1,46 @@
|
||||
IF OBJECT_ID('[dbo].[Organization_Read]') IS NOT NULL
|
||||
BEGIN
|
||||
DROP PROCEDURE [dbo].[Organization_Read]
|
||||
END
|
||||
GO
|
||||
|
||||
IF OBJECT_ID('[dbo].[Organization_ReadByEnabled]') IS NOT NULL
|
||||
BEGIN
|
||||
DROP PROCEDURE [dbo].[Organization_ReadByEnabled]
|
||||
END
|
||||
GO
|
||||
|
||||
CREATE PROCEDURE [dbo].[Organization_ReadByEnabled]
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON
|
||||
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
[dbo].[OrganizationView]
|
||||
WHERE
|
||||
[Enabled] = 1
|
||||
END
|
||||
GO
|
||||
|
||||
IF OBJECT_ID('[dbo].[User_ReadByPremium]') IS NOT NULL
|
||||
BEGIN
|
||||
DROP PROCEDURE [dbo].[User_ReadByPremium]
|
||||
END
|
||||
GO
|
||||
|
||||
CREATE PROCEDURE [dbo].[User_ReadByPremium]
|
||||
@Premium BIT
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON
|
||||
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
[dbo].[UserView]
|
||||
WHERE
|
||||
[Premium] = @Premium
|
||||
END
|
||||
GO
|
@ -7,6 +7,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="DbScripts\2017-08-22_00_LicenseCheckScripts.sql" />
|
||||
<EmbeddedResource Include="DbScripts\2017-08-19_00_InitialSetup.sql" />
|
||||
</ItemGroup>
|
||||
|
||||
|
Reference in New Issue
Block a user