mirror of
https://github.com/bitwarden/server
synced 2026-02-18 18:33:29 +00:00
fix: address TSQL formatting and documentation concerns and a misspelling.
This commit is contained in:
@@ -19,7 +19,7 @@ public enum EmergencyAccessStatusType : byte
|
||||
/// </summary>
|
||||
RecoveryInitiated = 3,
|
||||
/// <summary>
|
||||
/// The grantee has excercised their emergency access.
|
||||
/// The grantee has exercised their emergency access.
|
||||
/// </summary>
|
||||
RecoveryApproved = 4,
|
||||
}
|
||||
|
||||
@@ -5,20 +5,20 @@ BEGIN
|
||||
SET NOCOUNT ON
|
||||
|
||||
DECLARE @UserIds AS [GuidIdArray];
|
||||
DECLARE @BatchSize INT = 100
|
||||
|
||||
INSERT INTO @UserIds
|
||||
SELECT DISTINCT
|
||||
[GranteeId]
|
||||
FROM
|
||||
[dbo].[EmergencyAccess] EA
|
||||
INNER JOIN
|
||||
INNER JOIN
|
||||
@EmergencyAccessIds EAI ON EAI.[Id] = EA.[Id]
|
||||
WHERE
|
||||
EA.[Status] = 2
|
||||
AND
|
||||
EA.[Status] = 2 -- 2 = Bit.Core.Auth.Enums.EmergencyAccessStatusType.Confirmed
|
||||
AND
|
||||
EA.[GranteeId] IS NOT NULL
|
||||
|
||||
DECLARE @BatchSize INT = 100
|
||||
|
||||
-- Delete EmergencyAccess Records
|
||||
WHILE @BatchSize > 0
|
||||
@@ -27,7 +27,7 @@ BEGIN
|
||||
DELETE TOP(@BatchSize) EA
|
||||
FROM
|
||||
[dbo].[EmergencyAccess] EA
|
||||
INNER JOIN
|
||||
INNER JOIN
|
||||
@EmergencyAccessIds EAI ON EAI.[Id] = EA.[Id]
|
||||
|
||||
SET @BatchSize = @@ROWCOUNT
|
||||
|
||||
@@ -5,20 +5,20 @@ BEGIN
|
||||
SET NOCOUNT ON
|
||||
|
||||
DECLARE @UserIds AS [GuidIdArray];
|
||||
DECLARE @BatchSize INT = 100
|
||||
|
||||
INSERT INTO @UserIds
|
||||
SELECT DISTINCT
|
||||
[GranteeId]
|
||||
FROM
|
||||
[dbo].[EmergencyAccess] EA
|
||||
INNER JOIN
|
||||
INNER JOIN
|
||||
@EmergencyAccessIds EAI ON EAI.[Id] = EA.[Id]
|
||||
WHERE
|
||||
EA.[Status] = 2
|
||||
AND
|
||||
EA.[Status] = 2 -- 2 = Bit.Core.Auth.Enums.EmergencyAccessStatusType.Confirmed
|
||||
AND
|
||||
EA.[GranteeId] IS NOT NULL
|
||||
|
||||
DECLARE @BatchSize INT = 100
|
||||
|
||||
-- Delete EmergencyAccess Records
|
||||
WHILE @BatchSize > 0
|
||||
@@ -27,7 +27,7 @@ BEGIN
|
||||
DELETE TOP(@BatchSize) EA
|
||||
FROM
|
||||
[dbo].[EmergencyAccess] EA
|
||||
INNER JOIN
|
||||
INNER JOIN
|
||||
@EmergencyAccessIds EAI ON EAI.[Id] = EA.[Id]
|
||||
|
||||
SET @BatchSize = @@ROWCOUNT
|
||||
|
||||
Reference in New Issue
Block a user