mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 15:42:48 -05:00
feat: add deviceId to response for pending auth requests; Modified queries to match join for new devices; Fixed tests to account for object changes.
This commit is contained in:
@ -9,9 +9,12 @@ BEGIN
|
||||
;WITH PendingRequests AS (
|
||||
SELECT
|
||||
AR.*,
|
||||
ROW_NUMBER() OVER (PARTITION BY RequestDeviceIdentifier ORDER BY CreationDate DESC) AS rn
|
||||
D.Id AS DeviceId,
|
||||
ROW_NUMBER() OVER (PARTITION BY AR.RequestDeviceIdentifier ORDER BY AR.CreationDate DESC) AS rn
|
||||
FROM dbo.AuthRequestView AR
|
||||
WHERE Type IN (0, 1) -- 0 = AuthenticateAndUnlock, 1 = Unlock
|
||||
LEFT JOIN
|
||||
Device D ON AR.RequestDeviceIdentifier = D.Identifier
|
||||
WHERE AR.Type IN (0, 1) -- 0 = AuthenticateAndUnlock, 1 = Unlock
|
||||
AND AR.CreationDate >= DATEADD(MINUTE, -@ExpirationMinutes, GETUTCDATE())
|
||||
AND AR.UserId = @UserId
|
||||
)
|
||||
|
Reference in New Issue
Block a user