From 66f0c4b982cf2572724415d1b8b0fbc198a8cd63 Mon Sep 17 00:00:00 2001 From: Thomas Rittson <31796059+eliykat@users.noreply.github.com> Date: Fri, 12 Apr 2024 21:40:43 +1000 Subject: [PATCH] Enable unassigned items banner for self-host (#3978) --- src/Api/Vault/Controllers/CiphersController.cs | 7 +++---- src/Core/Constants.cs | 3 ++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Api/Vault/Controllers/CiphersController.cs b/src/Api/Vault/Controllers/CiphersController.cs index efc9a0eb88..95f3e52575 100644 --- a/src/Api/Vault/Controllers/CiphersController.cs +++ b/src/Api/Vault/Controllers/CiphersController.cs @@ -1118,11 +1118,10 @@ public class CiphersController : Controller [HttpGet("has-unassigned-ciphers")] public async Task HasUnassignedCiphers() { - var orgAbilities = await _applicationCacheService.GetOrganizationAbilitiesAsync(); - + // 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 && - orgAbilities.ContainsKey(o.Id) && orgAbilities[o.Id].FlexibleCollections); + .Where(o => o.Type is OrganizationUserType.Admin or OrganizationUserType.Owner); foreach (var org in adminOrganizations) { diff --git a/src/Core/Constants.cs b/src/Core/Constants.cs index 749419644a..c523f1c832 100644 --- a/src/Core/Constants.cs +++ b/src/Core/Constants.cs @@ -149,7 +149,8 @@ public static class FeatureFlagKeys { { TrustedDeviceEncryption, "true" }, { Fido2VaultCredentials, "true" }, - { DuoRedirect, "true" } + { DuoRedirect, "true" }, + { UnassignedItemsBanner, "true"} }; } }