mirror of
https://github.com/bitwarden/server.git
synced 2024-11-26 12:55:17 +01:00
sproc fixes
This commit is contained in:
parent
f194551afc
commit
6dac704708
@ -4,7 +4,7 @@
|
||||
@Name VARCHAR(MAX),
|
||||
@CreationDate DATETIME2(7),
|
||||
@RevisionDate DATETIME2(7),
|
||||
@GroupIds AS [dbo].[GuidIdArray] READONLY
|
||||
@Groups AS [dbo].[SelectionReadOnlyArray] READONLY
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON
|
||||
@ -28,9 +28,9 @@ BEGIN
|
||||
SELECT
|
||||
@Id,
|
||||
[Id],
|
||||
0
|
||||
[ReadOnly]
|
||||
FROM
|
||||
@GroupIds
|
||||
@Groups
|
||||
WHERE
|
||||
[Id] IN (SELECT [Id] FROM [AvailableGroupsCTE])
|
||||
END
|
@ -4,6 +4,12 @@ AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON
|
||||
|
||||
DELETE
|
||||
FROM
|
||||
[dbo].[CollectionGroup]
|
||||
WHERE
|
||||
[CollectionId] = @Id
|
||||
|
||||
DELETE
|
||||
FROM
|
||||
[dbo].[Collection]
|
||||
|
@ -48,6 +48,16 @@ BEGIN
|
||||
WHERE
|
||||
OU.[UserId] = @Id
|
||||
|
||||
-- Delete group users
|
||||
DELETE
|
||||
GU
|
||||
FROM
|
||||
[dbo].[GroupUser] GU
|
||||
INNER JOIN
|
||||
[dbo].[OrganizationUser] OU ON OU.[Id] = GU.[OrganizationUserId]
|
||||
WHERE
|
||||
OU.[UserId] = @Id
|
||||
|
||||
-- Delete organization users
|
||||
DELETE
|
||||
FROM
|
||||
|
Loading…
Reference in New Issue
Block a user