From fd5ea2f7b3ed16e0bfdd6a51091d55a6e1d2ae68 Mon Sep 17 00:00:00 2001 From: Alex Morask <144709477+amorask-bitwarden@users.noreply.github.com> Date: Thu, 26 Feb 2026 11:00:22 -0600 Subject: [PATCH] feat: add 'My Items' feature to enterprise organizations (#7031) --- src/Api/Models/Response/PlanResponseModel.cs | 2 ++ src/Core/Billing/Models/StaticStore/Plan.cs | 1 + src/Core/Billing/Pricing/Organizations/PlanAdapter.cs | 1 + test/Core.Test/Billing/Mocks/Plans/Enterprise2019Plan.cs | 1 + test/Core.Test/Billing/Mocks/Plans/Enterprise2020Plan.cs | 1 + test/Core.Test/Billing/Mocks/Plans/EnterprisePlan.cs | 1 + test/Core.Test/Billing/Mocks/Plans/EnterprisePlan2023.cs | 1 + 7 files changed, 8 insertions(+) diff --git a/src/Api/Models/Response/PlanResponseModel.cs b/src/Api/Models/Response/PlanResponseModel.cs index 6f2f752803..4f26047893 100644 --- a/src/Api/Models/Response/PlanResponseModel.cs +++ b/src/Api/Models/Response/PlanResponseModel.cs @@ -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; } diff --git a/src/Core/Billing/Models/StaticStore/Plan.cs b/src/Core/Billing/Models/StaticStore/Plan.cs index bab64d9879..01a27dd33b 100644 --- a/src/Core/Billing/Models/StaticStore/Plan.cs +++ b/src/Core/Billing/Models/StaticStore/Plan.cs @@ -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; } diff --git a/src/Core/Billing/Pricing/Organizations/PlanAdapter.cs b/src/Core/Billing/Pricing/Organizations/PlanAdapter.cs index 42090a56ca..9cb3d32e90 100644 --- a/src/Core/Billing/Pricing/Organizations/PlanAdapter.cs +++ b/src/Core/Billing/Pricing/Organizations/PlanAdapter.cs @@ -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; diff --git a/test/Core.Test/Billing/Mocks/Plans/Enterprise2019Plan.cs b/test/Core.Test/Billing/Mocks/Plans/Enterprise2019Plan.cs index 27f3710b96..a5ba0dc2c3 100644 --- a/test/Core.Test/Billing/Mocks/Plans/Enterprise2019Plan.cs +++ b/test/Core.Test/Billing/Mocks/Plans/Enterprise2019Plan.cs @@ -32,6 +32,7 @@ public record Enterprise2019Plan : Plan HasResetPassword = true; UsersGetPremium = true; HasCustomPermissions = true; + HasMyItems = true; UpgradeSortOrder = 4; DisplaySortOrder = 4; diff --git a/test/Core.Test/Billing/Mocks/Plans/Enterprise2020Plan.cs b/test/Core.Test/Billing/Mocks/Plans/Enterprise2020Plan.cs index 8f56125fc1..286d82a378 100644 --- a/test/Core.Test/Billing/Mocks/Plans/Enterprise2020Plan.cs +++ b/test/Core.Test/Billing/Mocks/Plans/Enterprise2020Plan.cs @@ -32,6 +32,7 @@ public record Enterprise2020Plan : Plan HasResetPassword = true; UsersGetPremium = true; HasCustomPermissions = true; + HasMyItems = true; UpgradeSortOrder = 4; DisplaySortOrder = 4; diff --git a/test/Core.Test/Billing/Mocks/Plans/EnterprisePlan.cs b/test/Core.Test/Billing/Mocks/Plans/EnterprisePlan.cs index 563adc82a3..32e2df7e60 100644 --- a/test/Core.Test/Billing/Mocks/Plans/EnterprisePlan.cs +++ b/test/Core.Test/Billing/Mocks/Plans/EnterprisePlan.cs @@ -32,6 +32,7 @@ public record EnterprisePlan : Plan HasResetPassword = true; UsersGetPremium = true; HasCustomPermissions = true; + HasMyItems = true; UpgradeSortOrder = 4; DisplaySortOrder = 4; diff --git a/test/Core.Test/Billing/Mocks/Plans/EnterprisePlan2023.cs b/test/Core.Test/Billing/Mocks/Plans/EnterprisePlan2023.cs index f221821ed3..54262585e4 100644 --- a/test/Core.Test/Billing/Mocks/Plans/EnterprisePlan2023.cs +++ b/test/Core.Test/Billing/Mocks/Plans/EnterprisePlan2023.cs @@ -32,6 +32,7 @@ public record Enterprise2023Plan : Plan HasResetPassword = true; UsersGetPremium = true; HasCustomPermissions = true; + HasMyItems = true; UpgradeSortOrder = 4; DisplaySortOrder = 4;