From ff8a436cd476f6f3a0df4e2fc18cb34164599502 Mon Sep 17 00:00:00 2001 From: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com> Date: Tue, 9 Jul 2024 15:59:41 -0500 Subject: [PATCH] chore: remove UnassignedItemBanners feature flag and API endpoint, refs AC-2520 (#4461) --- .../Vault/Controllers/CiphersController.cs | 26 ------------------- src/Core/Constants.cs | 2 -- 2 files changed, 28 deletions(-) diff --git a/src/Api/Vault/Controllers/CiphersController.cs b/src/Api/Vault/Controllers/CiphersController.cs index 13e0546a21..5283090e66 100644 --- a/src/Api/Vault/Controllers/CiphersController.cs +++ b/src/Api/Vault/Controllers/CiphersController.cs @@ -1205,32 +1205,6 @@ public class CiphersController : Controller }); } - /// - /// Returns true if the user is an admin or owner of an organization with unassigned ciphers (i.e. ciphers that - /// are not assigned to a collection). - /// - /// - [HttpGet("has-unassigned-ciphers")] - public async Task HasUnassignedCiphers() - { - // We don't filter for organization.FlexibleCollections here, it's shown for all orgs, and the client determines - // whether the message is shown in future tense (not yet migrated) or present tense (already migrated) - var adminOrganizations = _currentContext.Organizations - .Where(o => o.Type is OrganizationUserType.Admin or OrganizationUserType.Owner); - - foreach (var org in adminOrganizations) - { - var unassignedCiphers = await _cipherRepository.GetManyUnassignedOrganizationDetailsByOrganizationIdAsync(org.Id); - // We only care about non-deleted ciphers - if (unassignedCiphers.Any(c => c.DeletedDate == null)) - { - return true; - } - } - - return false; - } - private void ValidateAttachment() { if (!Request?.ContentType.Contains("multipart/") ?? true) diff --git a/src/Core/Constants.cs b/src/Core/Constants.cs index 86cb491a13..6ff37e52d7 100644 --- a/src/Core/Constants.cs +++ b/src/Core/Constants.cs @@ -121,7 +121,6 @@ public static class FeatureFlagKeys public const string AC2101UpdateTrialInitiationEmail = "AC-2101-update-trial-initiation-email"; public const string EnableConsolidatedBilling = "enable-consolidated-billing"; public const string AC1795_UpdatedSubscriptionStatusSection = "AC-1795_updated-subscription-status-section"; - public const string UnassignedItemsBanner = "unassigned-items-banner"; public const string EnableDeleteProvider = "AC-1218-delete-provider"; public const string EmailVerification = "email-verification"; public const string EmailVerificationDisableTimingDelays = "email-verification-disable-timing-delays"; @@ -152,7 +151,6 @@ public static class FeatureFlagKeys return new Dictionary() { { DuoRedirect, "true" }, - { UnassignedItemsBanner, "true"}, { FlexibleCollectionsV1, "true" } }; }