1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-27 13:05:23 +01:00
bitwarden-server/util/Migrator/DbScripts/2021-08-12_00_ReadByMinimumRoleCheckStatus.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
501 B
MySQL
Raw Normal View History

2021-08-12 19:06:02 +02:00
IF OBJECT_ID('[dbo].[OrganizationUser_ReadByMinimumRole]') IS NOT NULL
BEGIN
DROP PROCEDURE [dbo].[OrganizationUser_ReadByMinimumRole]
END
GO
CREATE PROCEDURE [dbo].[OrganizationUser_ReadByMinimumRole]
@OrganizationId UNIQUEIDENTIFIER,
@MinRole TINYINT
AS
BEGIN
SET NOCOUNT ON
SELECT
*
FROM
[dbo].[OrganizationUserUserDetailsView]
WHERE
OrganizationId = @OrganizationId
AND Status = 2 -- 2 = Confirmed
2021-08-12 19:06:02 +02:00
AND [Type] <= @MinRole
END