1
0
mirror of https://github.com/bitwarden/server synced 2025-12-25 20:53:16 +00:00

[PM-21097] Fix: Prevent admin-added sponsored families from appearing in individual vault settings (#5767)

* Changes to resolve sponsorship showing in individual vault

* Resolve the failing unit test

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>

* Resolve the failing test

* Resolve the failing test

* Resolve the failing test

* fix make IsAdminInitiated nullable

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>

* Add the isAdminInitiated property

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>

* Resolve the database error

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>

* Resolve the failing unit test

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>

* Resolve the scan error

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>

* Resolve the database issue

* resolve the database build error

* Resolve the database build error

* Resolve the synchronization issue

---------

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
This commit is contained in:
cyprain-okeke
2025-05-12 18:21:07 +01:00
committed by GitHub
parent 3a848d5747
commit e4359f071c
11 changed files with 294 additions and 12 deletions

View File

@@ -1,8 +1,9 @@
CREATE PROCEDURE [dbo].[OrganizationSponsorship_ReadBySponsoringOrganizationUserId]
@SponsoringOrganizationUserId UNIQUEIDENTIFIER
@SponsoringOrganizationUserId UNIQUEIDENTIFIER,
@IsAdminInitiated BIT = 0
AS
BEGIN
SET NOCOUNT ON
SET NOCOUNT ON;
SELECT
*
@@ -10,5 +11,5 @@ BEGIN
[dbo].[OrganizationSponsorshipView]
WHERE
[SponsoringOrganizationUserId] = @SponsoringOrganizationUserId
END
GO
and [IsAdminInitiated] = @IsAdminInitiated
END

View File

@@ -51,7 +51,8 @@ SELECT
O.[AllowAdminAccessToAllCollectionItems],
O.[UseRiskInsights],
O.[UseAdminSponsoredFamilies],
O.[LimitItemDeletion]
O.[LimitItemDeletion],
OS.[IsAdminInitiated]
FROM
[dbo].[OrganizationUser] OU
LEFT JOIN