mirror of
https://github.com/bitwarden/server
synced 2025-12-18 17:23:28 +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:
@@ -271,8 +271,11 @@ public class OrganizationSponsorshipsController : Controller
|
||||
}
|
||||
|
||||
var sponsorships = await _organizationSponsorshipRepository.GetManyBySponsoringOrganizationAsync(sponsoringOrgId);
|
||||
return new ListResponseModel<OrganizationSponsorshipInvitesResponseModel>(sponsorships.Select(s =>
|
||||
new OrganizationSponsorshipInvitesResponseModel(new OrganizationSponsorshipData(s))));
|
||||
return new ListResponseModel<OrganizationSponsorshipInvitesResponseModel>(
|
||||
sponsorships
|
||||
.Where(s => s.IsAdminInitiated)
|
||||
.Select(s => new OrganizationSponsorshipInvitesResponseModel(new OrganizationSponsorshipData(s)))
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user