mirror of
https://github.com/bitwarden/server.git
synced 2025-07-05 01:52:49 -05: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:
@ -58,7 +58,8 @@ public class ProfileOrganizationResponseModel : ResponseModel
|
||||
ProviderName = organization.ProviderName;
|
||||
ProviderType = organization.ProviderType;
|
||||
FamilySponsorshipFriendlyName = organization.FamilySponsorshipFriendlyName;
|
||||
FamilySponsorshipAvailable = FamilySponsorshipFriendlyName == null &&
|
||||
IsAdminInitiated = organization.IsAdminInitiated ?? false;
|
||||
FamilySponsorshipAvailable = (FamilySponsorshipFriendlyName == null || IsAdminInitiated) &&
|
||||
StaticStore.GetSponsoredPlan(PlanSponsorshipType.FamiliesForEnterprise)
|
||||
.UsersCanSponsor(organization);
|
||||
ProductTierType = organization.PlanType.GetProductTier();
|
||||
@ -157,4 +158,5 @@ public class ProfileOrganizationResponseModel : ResponseModel
|
||||
public bool UserIsClaimedByOrganization { get; set; }
|
||||
public bool UseRiskInsights { get; set; }
|
||||
public bool UseAdminSponsoredFamilies { get; set; }
|
||||
public bool IsAdminInitiated { get; set; }
|
||||
}
|
||||
|
Reference in New Issue
Block a user