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