mirror of
https://github.com/bitwarden/server
synced 2025-12-29 14:43:39 +00:00
[PM-25372] Filter out DefaultUserCollections from CiphersController.GetAssignedOrganizationCiphers (#6274)
Co-authored-by: Jimmy Vo <huynhmaivo82@gmail.com>
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
CREATE PROCEDURE [dbo].[CollectionCipher_ReadSharedByOrganizationId]
|
||||
@OrganizationId UNIQUEIDENTIFIER
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON
|
||||
|
||||
SELECT
|
||||
CC.[CollectionId],
|
||||
CC.[CipherId]
|
||||
FROM
|
||||
[dbo].[CollectionCipher] CC
|
||||
INNER JOIN
|
||||
[dbo].[Collection] C ON C.[Id] = CC.[CollectionId]
|
||||
WHERE
|
||||
C.[OrganizationId] = @OrganizationId
|
||||
AND C.[Type] = 0 -- SharedCollections only
|
||||
END
|
||||
@@ -14,6 +14,6 @@ GO
|
||||
|
||||
CREATE NONCLUSTERED INDEX [IX_Collection_OrganizationId_IncludeAll]
|
||||
ON [dbo].[Collection]([OrganizationId] ASC)
|
||||
INCLUDE([CreationDate], [Name], [RevisionDate]);
|
||||
INCLUDE([CreationDate], [Name], [RevisionDate], [Type]);
|
||||
GO
|
||||
|
||||
|
||||
Reference in New Issue
Block a user