1
0
mirror of https://github.com/bitwarden/server synced 2026-02-27 09:53:42 +00:00

feat: add 'My Items' feature to enterprise organizations (#7031)

This commit is contained in:
Alex Morask
2026-02-26 11:00:22 -06:00
committed by GitHub
parent 47b60ef6cd
commit fd5ea2f7b3
7 changed files with 8 additions and 0 deletions

View File

@@ -38,6 +38,7 @@ public class PlanResponseModel : ResponseModel
HasOrganizationDomains = plan.HasOrganizationDomains;
HasResetPassword = plan.HasResetPassword;
UsersGetPremium = plan.UsersGetPremium;
HasMyItems = plan.HasMyItems;
UpgradeSortOrder = plan.UpgradeSortOrder;
DisplaySortOrder = plan.DisplaySortOrder;
LegacyYear = plan.LegacyYear;
@@ -78,6 +79,7 @@ public class PlanResponseModel : ResponseModel
public bool HasOrganizationDomains { get; set; }
public bool HasResetPassword { get; set; }
public bool UsersGetPremium { get; set; }
public bool HasMyItems { get; set; }
public int UpgradeSortOrder { get; set; }
public int DisplaySortOrder { get; set; }

View File

@@ -33,6 +33,7 @@ public abstract record Plan
public bool HasResetPassword { get; protected init; }
public bool UsersGetPremium { get; protected init; }
public bool HasCustomPermissions { get; protected init; }
public bool HasMyItems { get; protected init; }
public int UpgradeSortOrder { get; protected init; }
// TODO: Move to the client
public int DisplaySortOrder { get; protected init; }

View File

@@ -28,6 +28,7 @@ public record PlanAdapter : Core.Models.StaticStore.Plan
HasResetPassword = HasFeature("resetPassword");
UsersGetPremium = HasFeature("usersGetPremium");
HasCustomPermissions = HasFeature("customPermissions");
HasMyItems = HasFeature("myItems");
UpgradeSortOrder = plan.AdditionalData.TryGetValue("upgradeSortOrder", out var upgradeSortOrder)
? int.Parse(upgradeSortOrder)
: 0;

View File

@@ -32,6 +32,7 @@ public record Enterprise2019Plan : Plan
HasResetPassword = true;
UsersGetPremium = true;
HasCustomPermissions = true;
HasMyItems = true;
UpgradeSortOrder = 4;
DisplaySortOrder = 4;

View File

@@ -32,6 +32,7 @@ public record Enterprise2020Plan : Plan
HasResetPassword = true;
UsersGetPremium = true;
HasCustomPermissions = true;
HasMyItems = true;
UpgradeSortOrder = 4;
DisplaySortOrder = 4;

View File

@@ -32,6 +32,7 @@ public record EnterprisePlan : Plan
HasResetPassword = true;
UsersGetPremium = true;
HasCustomPermissions = true;
HasMyItems = true;
UpgradeSortOrder = 4;
DisplaySortOrder = 4;

View File

@@ -32,6 +32,7 @@ public record Enterprise2023Plan : Plan
HasResetPassword = true;
UsersGetPremium = true;
HasCustomPermissions = true;
HasMyItems = true;
UpgradeSortOrder = 4;
DisplaySortOrder = 4;