1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-26 12:55:17 +01:00

sproc fixes

This commit is contained in:
Kyle Spearrin 2017-05-20 08:53:24 -04:00
parent f194551afc
commit 6dac704708
3 changed files with 19 additions and 3 deletions

View File

@ -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

View File

@ -4,6 +4,12 @@ AS
BEGIN
SET NOCOUNT ON
DELETE
FROM
[dbo].[CollectionGroup]
WHERE
[CollectionId] = @Id
DELETE
FROM
[dbo].[Collection]

View File

@ -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