mirror of
https://github.com/bitwarden/server.git
synced 2025-07-17 15:40:59 -05:00
remove user from group apis
This commit is contained in:
@ -194,6 +194,7 @@
|
||||
<Build Include="dbo\Stored Procedures\GroupUserUserDetails_ReadByGroupId.sql" />
|
||||
<Build Include="dbo\Stored Procedures\GroupUser_ReadGroupIdsByOrganizationUserId.sql" />
|
||||
<Build Include="dbo\Stored Procedures\GroupUser_UpdateGroups.sql" />
|
||||
<Build Include="dbo\Stored Procedures\GroupUser_Delete.sql" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<RefactorLog Include="Sql.refactorlog" />
|
||||
|
@ -37,4 +37,6 @@ BEGIN
|
||||
AND [Target].[CollectionId] = @Id THEN
|
||||
DELETE
|
||||
;
|
||||
|
||||
-- TODO: Update user revision date times that this affects
|
||||
END
|
16
src/Sql/dbo/Stored Procedures/GroupUser_Delete.sql
Normal file
16
src/Sql/dbo/Stored Procedures/GroupUser_Delete.sql
Normal file
@ -0,0 +1,16 @@
|
||||
CREATE PROCEDURE [dbo].[GroupUser_Delete]
|
||||
@GroupId UNIQUEIDENTIFIER,
|
||||
@OrganizationUserId UNIQUEIDENTIFIER
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON
|
||||
|
||||
DELETE
|
||||
FROM
|
||||
[dbo].[GroupUser]
|
||||
WHERE
|
||||
[GroupId] = @GroupId
|
||||
AND [OrganizationUserId] = @OrganizationUserId
|
||||
|
||||
EXEC [dbo].[User_BumpAccountRevisionDateByOrganizationUserId] @OrganizationUserId
|
||||
END
|
@ -41,4 +41,6 @@ BEGIN
|
||||
AND [Target].[GroupId] IN (SELECT [Id] FROM [AvailableGroupsCTE]) THEN
|
||||
DELETE
|
||||
;
|
||||
|
||||
EXEC [dbo].[User_BumpAccountRevisionDateByOrganizationUserId] @OrganizationUserId
|
||||
END
|
@ -37,4 +37,6 @@ BEGIN
|
||||
AND [Target].[GroupId] = @Id THEN
|
||||
DELETE
|
||||
;
|
||||
|
||||
-- TODO: Update user revision date times that this affects
|
||||
END
|
Reference in New Issue
Block a user