mirror of
https://github.com/bitwarden/server
synced 2026-01-21 11:53:41 +00:00
Add support for Emergency Access (#1000)
* Add support for Emergency Access * Add migration script * Review comments * Ensure grantor has premium when inviting new grantees. * Resolve review comments * Remove two factor references
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
CREATE PROCEDURE [dbo].[EmergencyAccess_ReadToNotify]
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON
|
||||
|
||||
SELECT
|
||||
EA.*,
|
||||
Grantee.Name as GranteeName,
|
||||
Grantor.Email as GrantorEmail
|
||||
FROM
|
||||
[dbo].[EmergencyAccess] EA
|
||||
LEFT JOIN
|
||||
[dbo].[User] Grantor ON Grantor.[Id] = EA.[GrantorId]
|
||||
LEFT JOIN
|
||||
[dbo].[User] Grantee On Grantee.[Id] = EA.[GranteeId]
|
||||
WHERE
|
||||
EA.[Status] = 3
|
||||
AND
|
||||
DATEADD(DAY, EA.[WaitTimeDays] - 1, EA.[RecoveryInitiatedDate]) <= GETUTCDATE()
|
||||
AND
|
||||
DATEADD(DAY, 1, EA.[LastNotificationDate]) <= GETUTCDATE()
|
||||
END
|
||||
Reference in New Issue
Block a user