1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-22 13:35:10 -05:00

Enable unassigned items banner for self-host (#3978)

This commit is contained in:
Thomas Rittson 2024-04-12 21:40:43 +10:00 committed by GitHub
parent 736a6f19a5
commit 66f0c4b982
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View File

@ -1118,11 +1118,10 @@ public class CiphersController : Controller
[HttpGet("has-unassigned-ciphers")] [HttpGet("has-unassigned-ciphers")]
public async Task<bool> HasUnassignedCiphers() public async Task<bool> 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 var adminOrganizations = _currentContext.Organizations
.Where(o => o.Type is OrganizationUserType.Admin or OrganizationUserType.Owner && .Where(o => o.Type is OrganizationUserType.Admin or OrganizationUserType.Owner);
orgAbilities.ContainsKey(o.Id) && orgAbilities[o.Id].FlexibleCollections);
foreach (var org in adminOrganizations) foreach (var org in adminOrganizations)
{ {

View File

@ -149,7 +149,8 @@ public static class FeatureFlagKeys
{ {
{ TrustedDeviceEncryption, "true" }, { TrustedDeviceEncryption, "true" },
{ Fido2VaultCredentials, "true" }, { Fido2VaultCredentials, "true" },
{ DuoRedirect, "true" } { DuoRedirect, "true" },
{ UnassignedItemsBanner, "true"}
}; };
} }
} }