1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-03 00:52:49 -05:00

[SG-1082]-Defect-Update stored procedure to properly determine is SSO is available (#2715)

* Fixed SsoAvailble bug by using the enabled column from SsoConfig table, updated the existing query for EF Core

* Added no tracking to ef query since it is read only
This commit is contained in:
SmithThe4th
2023-02-17 13:19:21 -05:00
committed by GitHub
parent 69511160cb
commit 34544f2292
4 changed files with 54 additions and 28 deletions

View File

@ -11,7 +11,7 @@ BEGIN
SELECT
O.Id AS OrganizationId,
O.[Name] AS OrganizationName,
O.UseSso AS SsoAvailable,
S.Enabled AS SsoAvailable,
P.Enabled AS SsoRequired,
O.Identifier AS OrganizationIdentifier,
OD.VerifiedDate,
@ -23,6 +23,8 @@ BEGIN
ON O.Id = OD.OrganizationId
LEFT JOIN [dbo].[PolicyView] P
ON O.Id = P.OrganizationId
LEFT JOIN [dbo].[Ssoconfig] S
ON O.Id = S.OrganizationId
WHERE OD.DomainName = @Domain
AND O.Enabled = 1
AND (P.Id is NULL OR (P.Id IS NOT NULL AND P.[Type] = 4)) -- SSO Type