mirror of
https://github.com/bitwarden/server.git
synced 2024-12-05 14:23:30 +01:00
8f27f21ce0
* Add SsoUser_ReadByUserIdOrganizationId * Automatically reset stale/duplicate Sso links * Fix typo * Check for stale Sso link in existing user flow * Delete any stale user record before provisioning new user * Check for existing db query before creating * PR feedback updates Co-authored-by: Chad Scharf <3904944+cscharf@users.noreply.github.com>
22 lines
449 B
Transact-SQL
22 lines
449 B
Transact-SQL
IF OBJECT_ID('[dbo].[SsoUser_ReadByUserIdOrganizationId]') IS NOT NULL
|
|
BEGIN
|
|
DROP PROCEDURE [dbo].[SsoUser_ReadByUserIdOrganizationId]
|
|
END
|
|
GO
|
|
|
|
CREATE PROCEDURE [dbo].[SsoUser_ReadByUserIdOrganizationId]
|
|
@UserId UNIQUEIDENTIFIER,
|
|
@OrganizationId UNIQUEIDENTIFIER
|
|
AS
|
|
BEGIN
|
|
SET NOCOUNT ON
|
|
|
|
SELECT
|
|
*
|
|
FROM
|
|
[dbo].[SsoUserView]
|
|
WHERE
|
|
[UserId] = @UserId
|
|
AND [OrganizationId] = @OrganizationId
|
|
END
|