From 33ef70c1923f051dc8a9de5c724cafbd569ef534 Mon Sep 17 00:00:00 2001 From: Stefan Melmuk Date: Thu, 24 Aug 2023 22:33:35 +0200 Subject: [PATCH] add minimal secretsmanager plan for web-v2023.8.x in web-v2023.8.x the getPlans() call was changed from `/plans/` to `/plans/all` and the create new organization form also requires a bitwardenProduct to differentiate between plans for PasswordManager and the SecretsManager --- src/api/core/organizations.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/api/core/organizations.rs b/src/api/core/organizations.rs index 0bcf262f..40490833 100644 --- a/src/api/core/organizations.rs +++ b/src/api/core/organizations.rs @@ -60,6 +60,7 @@ pub fn routes() -> Vec { put_policy, get_organization_tax, get_plans, + get_plans_all, get_plans_tax_rates, import, post_org_keys, @@ -1810,12 +1811,28 @@ fn get_plans() -> Json { "Product": 0, "Name": "Free", "NameLocalizationKey": "planNameFree", + "BitwardenProduct": 0, + "MaxUsers": 0, + "DescriptionLocalizationKey": "planDescFree" + },{ + "Object": "plan", + "Type": 0, + "Product": 1, + "Name": "Free", + "NameLocalizationKey": "planNameFree", + "BitwardenProduct": 1, + "MaxUsers": 0, "DescriptionLocalizationKey": "planDescFree" }], "ContinuationToken": null })) } +#[get("/plans/all")] +fn get_plans_all() -> Json { + get_plans() +} + #[get("/plans/sales-tax-rates")] fn get_plans_tax_rates(_headers: Headers) -> Json { // Prevent a 404 error, which also causes Javascript errors.