mirror of
https://github.com/bitwarden/server.git
synced 2025-07-16 15:17:33 -05:00
[Bug] Improve SSO user provision flow (#1022)
* Initial commit of provisioning updates * Updated strings * removed extra BANG * Separated orgUsers db lookup - prioritized existing user Id * Updated create sso record method // Added sproc for org/email retrieval
This commit is contained in:
@ -294,5 +294,7 @@
|
||||
<Build Include="dbo\Stored Procedures\TaxRate_ReadAllActive.sql" />
|
||||
<Build Include="dbo\Stored Procedures\TaxRate_Create.sql" />
|
||||
<Build Include="dbo\Stored Procedures\TaxRate_Archive.sql" />
|
||||
<Build Include="dbo\Stored Procedures\OrganizationUser_ReadByOrganizationIdEmail.sql" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
|
@ -0,0 +1,17 @@
|
||||
CREATE PROCEDURE [dbo].[OrganizationUser_ReadByOrganizationIdEmail]
|
||||
@OrganizationId UNIQUEIDENTIFIER,
|
||||
@Email NVARCHAR(50)
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON
|
||||
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
[dbo].[OrganizationUserView]
|
||||
WHERE
|
||||
[OrganizationId] = @OrganizationId
|
||||
AND [Email] IS NOT NULL
|
||||
AND @Email IS NOT NULL
|
||||
AND [Email] = @Email
|
||||
END
|
Reference in New Issue
Block a user