1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-02 16:42:50 -05:00

only update user groups if they are not the same

This commit is contained in:
Kyle Spearrin
2017-05-13 14:14:20 -04:00
parent 0333b47237
commit a0ac7242b6
6 changed files with 75 additions and 20 deletions

View File

@ -189,5 +189,6 @@
<Build Include="dbo\Stored Procedures\OrganizationUser_CreateWithCollections.sql" />
<Build Include="dbo\Stored Procedures\OrganizationUser_UpdateWithCollections.sql" />
<Build Include="dbo\Stored Procedures\CollectionUser_Delete.sql" />
<Build Include="dbo\Stored Procedures\GroupUser_ReadByOrganizationId.sql" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,15 @@
CREATE PROCEDURE [dbo].[GroupUser_ReadByOrganizationId]
@OrganizationId UNIQUEIDENTIFIER
AS
BEGIN
SET NOCOUNT ON
SELECT
GU.*
FROM
[dbo].[GroupUser] GU
INNER JOIN
[dbo].[Group] G ON G.[Id] = GU.[GroupId]
WHERE
G.[OrganizationId] = @OrganizationId
END